Just like your computer, a WordPress website can get full of clutter as time goes by and it’s important that once in a while you take some time to have a clear out. Removing clutter from WordPress can improve speed, simplify management and remove security vulnerabilities. In addition, if you have limits on your storage capacity, file numbers or database size, decluttering can free up valuable space. To show you how to declutter effectively, here are our five top tips.

就像您的计算机一样,随着时间的流逝,WordPress网站可能会变得混乱不堪,重要的是,偶尔需要花费一些时间进行清理。 从WordPress消除混乱可以提高速度,简化管理并消除安全漏洞。 此外,如果您对存储容量,文件号或数据库大小有限制,则整理可以释放宝贵的空间。 为了向您展示如何有效整理,这是我们的五个主要技巧。

删除不需要的插件 (Remove unwanted plugins)

Deactivated plugins have two effects on your website, they use up valuable storage space and, if they are not kept up-to-date, they post a security risk as any security holes can still be breached whether they are being used or not. For this reason, it is always best to delete them.

停用的插件会在您的网站上产生两种影响,它们会消耗宝贵的存储空间,并且,如果不及时更新插件,则会发布安全隐患,因为无论是否使用它们,任何安全漏洞都可能被破坏。 因此,最好始终将其删除。

To do this, navigate to Plugins in the WordPress dashboard left-hand menu and click on ‘Inactive’.

为此,请导航至WordPress仪表板左侧菜单中的插件,然后单击“非活动”。

Once there, click the checkbox on the plugins you want to remove, select the ‘Delete’ option from the drop-down box and click the Apply button.

到达该位置后,单击要删除的插件上的复选框,从下拉框中选择“删除”选项,然后单击“应用”按钮。

The plugins will now be deleted.

插件现在将被删除。

  删除未使用的主题 ( Delete unused themes)

The only themes you need on WordPress are the one you are using and any child version you’ve created to enable customisation. Everything else is just taking up valuable space and, as with plugins, can leave your site vulnerable if you don’t have the latest versions installed. This can be particularly true if you have third-party themes installed which can’t be automatically updated from WordPress and for which you might not receive update notifications.

WordPress上唯一需要的主题是您正在使用的主题,以及您创建的用于启用自定义的任何子版本。 其他所有东西都只是占用了宝贵的空间,并且与插件一样,如果您未安装最新版本,可能会使您的网站容易受到攻击。 如果您安装了第三方主题,这些主题无法从WordPress自动更新,并且您可能不会收到更新通知,则尤其如此。

To remove, do the following:

要删除,请执行以下操作:

Navigate to Appearance > Themes. Hover over the image of the theme you want to delete and click on the Theme Details box. When the Theme Details dialogue box opens, you will see a delete link in the bottom right-hand corner. Click on the link and when the confirmation box opens, click OK.

导航到外观>主题。 将鼠标悬停在要删除的主题图像上,然后单击“主题详细信息”框。 当“主题详细信息”对话框打开时,您将在右下角看到一个删除链接。 单击链接,当确认框打开时,单击确定。


删除帖子修订 (
Delete post revisions)

If you are one of those people who clicks ‘Save Draft’ after every change and then makes several proofreading updates after publishing, you might be surprised to know that every time you save or update, a new version of the post is stored in your WordPress database. You might have 100 posts on your website, but you might have 1000 versions in your database, 900 of which are just taking up valuable space.

如果您是每次更改后都单击“保存草稿”,然后在发布后进行几次校对更新的人之一,您可能会惊讶地知道,每次保存或更新时,都会在WordPress中存储该帖子的新版本数据库。 您的网站上可能有100个帖子,但是数据库中可能有1000个版本,其中900个版本仅占用了宝贵的空间。

Some web hosts put a limit on database capacity and this is often much smaller than the file storage capacity you have for your WordPress, theme and plugins and media files – sometimes as low as 100MB. By having too many revisions, you can quickly clutter up your database and this can make it sluggish in performance.

一些Web主机对数据库容量进行了限制,并且通常比WordPress,主题和插件以及媒体文件的文件存储容量小得多,有时甚至低至100MB。 通过过多的修订,您可以快速使数据库混乱,这会使数据库性能降低。

There are a number of plugins that you can install to remove old revisions, such as RVG Optimize Database which gives you control over which revisions you may wish to keep. This plugin also optimises the database after deletion, helping it to perform better.

您可以安装许多插件来删除旧的修订版,例如RVG Optimize Database ,它使您可以控制希望保留的修订版。 该插件还在删除后优化数据库,以帮助其更好地执行。

As you can see from the image below, in this example, the plugin managed to remove 6.324 MB from the database, reducing the size by 26%.

从下图可以看到,在此示例中,该插件设法从数据库中删除了6.324 MB,大小减少了26%。


清理您的媒体库 (
Clean up you media library)

Every time you upload a new image to your website, WordPress will create at least three different versions of it. This enables you to have images in original (full) size, large, medium and thumbnail. In addition, some themes or plugins can produce extra images of different sizes, for example, if you have a slider or an e-commerce plugin, images sizes can be created to meet their requirements.

每次您将新图像上传到您的网站时,WordPress都会为其创建至少三个不同版本。 这样一来,您就可以以原始(完整)尺寸,大,中和缩略图显示图像。 此外,某些主题或插件可以生成不同大小的其他图像,例如,如果您有滑块或电子商务插件,则可以创建图像大小以满足其要求。

What this means is that if you have uploaded 200 images to your media library, it is possible that you actually have over 1000 images stored on your server. If you have an e-commerce site with hundreds of products, each with several images, the numbers of actual images created and stored can run into the tens of thousands very quickly.

这意味着如果您已将200张图像上载到媒体库,则服务器上实际上可能存储了1000张以上的图像。 如果您的电子商务站点包含数百种产品,每种产品都有几张图像,那么创建和存储的实际图像数可能很快就成千上万。

One of the problems with e-commerce plugins, in particular, is that when you delete a product, it doesn’t always delete the associated images, so the numbers can soon build up. This can be a serious issue for websites that have a limit on the number of files they can upload and, as image files tend to be large in size, they can quickly fill up your storage capacity too.

特别是电子商务插件的问题之一是,当您删除产品时,它并不总是删除关联的图像,因此数量很快就会增加。 对于网站上载文件数量受到限制的网站而言,这可能是一个严重的问题,而且由于图像文件的大小往往很大,它们也可以Swift填满您的存储容量。

The best solution is to use the Image Cleanup plugin. This plugin is good because it will let you find and quarantine images before you delete them. When you quarantine them, you just move them to a temporary folder and this enables you to see if you have mistakenly removed images you really needed. If you have, you can move them back. Once you are happy you haven’t removed any essential images, you can then delete the unnecessary ones and save all that space.

最好的解决方案是使用图像清理插件。 这个插件很好,因为它可以让您在删除图像之前找到并隔离图像。 隔离它们时,只需将它们移到一个临时文件夹中,这样就可以查看是否错误地删除了您真正需要的图像。 如果有的话,可以将它们移回原处。 满意之后,您还可以删除所有不必要的图像,并节省所有空间。

删除垃圾评论 (Delete spam comments)

The WordPress’ inbuilt comment system is a real magnet for spam commenters and unless you manage your comments effectively, you will end up with lots of pending spam comments cluttering up your database.

WordPress的内置评论系统非常吸引垃圾评论者,除非您有效地管理评论,否则最终将有大量待处理的垃圾评论使数据库混乱。

Manually removing spam can be an arduous task. Usually, you are limited to about 200 comments at a time for bulk deletion and if you want to check through to see which are spam comments and which are genuine; this can make the process even longer. And the deletion itself can take some time if your server is busy.

手动删除垃圾邮件可能是一项艰巨的任务。 通常,一次只能删除大约200条评论,以进行批量删除;如果您要检查以查看哪些是垃圾评论,哪些是真实的,则可以; 这会使过程更长。 如果您的服务器繁忙,则删除本身可能需要一些时间。

A slightly easier method is to use the Delete Pending Comments plugin which will delete all your pending comments in one click. The downside, of course, is that genuine comments will get deleted too unless you work your way through and approve them.

一种更简单的方法是使用“ 删除待处理的注释”插件,该插件将一键删除所有待处理的注释。 当然,不利的一面是,除非您逐步审核并批准,否则真正的评论也会被删除。

The best method is to activate the Askimet plugin that comes preinstalled with WordPress. This will save you all the work by automatically deleting spam and leaving your genuine comments behind.

最好的方法是激活WordPress预先安装的Askimet插件。 通过自动删除垃圾邮件并留下真实的评论,可以节省您的所有工作。

To give you an idea of the scale of comment spam with WordPress, take a look at the graph below.

为了让您了解使用WordPress的评论垃圾邮件的规模,请看下面的图表。

 

These are the stats for a small, three-year-old blog with just a few thousand visitors per month. In those three years, Askimet has removed more than 400,000 spam comments. That’s about six times more spam comments than the site has had visitors!

这些是一个只有3年历史的小型博客的统计数据,该博客每月只有数千名访问者。 在这三年中,Askimet删除了40万条垃圾邮件评论。 垃圾评论的数量大约是该网站访问者的六倍!

The other thing to consider to stop spam comments cluttering your site, is adding a captcha plugin. At its peak, Askimet was filtering 28,000 spam comments a month from this site, once a captcha plugin was added, this quickly reduced to the few hundred you can see today. This is because the vast number of spam comments were posted by bots, not by people.

要阻止垃圾邮件评论使您的网站混乱,要考虑的另一件事是添加一个验证码插件。 顶峰时期,一旦添加了验证码插件,Askimet每月就会从该站点过滤28,000条垃圾邮件评论,此数量很快就减少到今天可以看到的数百条。 这是因为大量垃圾邮件评论是由漫游器而非人员发布的。

结论 (Conclusion)

From reading this article you’ll have a better understanding of how you can declutter your WordPress site by removing unused plugins and themes, superfluous post revisions, unnecessary media files and spam comments.

通过阅读本文,您将更好地了解如何通过删除未使用的插件和主题,多余的帖子修订,不必要的媒体文件和垃圾邮件注释来整理WordPress网站。

Getting rid of this unneeded content can make it easier to manage your files, increase available storage and database space and make your site less vulnerable to hackers. It can also have some impact on performance.

摆脱这些不必要的内容,可以更轻松地管理文件,增加可用存储空间和数据库空间,并使您的站点更不容易受到黑客的攻击。 它也会对性能产生一些影响。

If you are a WordPress site owner, see how eUKhost’s dedicated WordPress Hosting can help you.

如果您是WordPress网站所有者,请参阅eUKhost的专用WordPress托管如何为您提供帮助。

翻译自: https://www.eukhost/blog/webhosting/5-easy-ways-to-declutter-your-wordpress-site/

更多推荐

5种简化WordPress网站的简便方法