In some ways, your WordPress resembles your home.
It’s easy to carry stuff in. And at some point, you start losing control of your property: There is too much stuff inside.
The only way to fix the situation is to declutter your house so that you are in control – again.
The same happens with your WordPress.
The new and shiny WordPress installation is quick and straightforward to use. But as the months go by, managing your website becomes harder.
Finally, you conclude: “I have to do something – I have to clean up my WordPress website. But how?”.
And that’s what I’m here to tell you. But before we get any further, let me tell you something important first.
- Backups, Backups, Backups!
- 1. Turn off the Screen Elements on the Dashboard
- 2. Get Rid of Unused Plugins
- 3. Get Rid of Unused Themes
- 4. Get Rid of Unnecessary Posts
- 5. Get Rid of Unnecessary Post Revisions
- 6. Get Rid of Unnecessary Pages
- 7. Get Rid of Unused Images
- 8. Get Rid of Unnecessary User Accounts
- 9. Get Rid of Spam Comments
- So Now I'm Done for Good? Not Quite…
Backups, Backups, Backups!
Before any cleaning steps, ensure you have backed up your WordPress.
While many web hosts offer daily backups as part of their plans, you may want to opt into something “more real-time”.
One of the most popular backup solutions is Updraft Plus, which you can download for free. It’s an excellent tool for backing things up before your start decluttering WordPress.
Now that you know about backups and their importance, let’s start cleaning!
1. Turn off the Screen Elements on the Dashboard
Let’s start with the Dashboard first, with a setting that often goes unnoticed.
When you look at the top of the view in your Dashboard, you’ll notice the Screen Options:
That’s the setting you can use to tweak the current view on the page. When you open it, you get the options like this:
What you see in the picture above is a partial list of the options you can choose on your Dashboard page. So ticking those options on and off will either show or hide the screen elements on the Dashboard.
My way is to keep things minimal, so after ticking off all the options, my view looks like this:
In some cases, some plugins may display screen elements too. Often the way to get rid of those kinds of screen elements is to buy a premium version of the product.
Screen Options adjust based on the page you are in. This means that the available options depend on the page you are on.
2. Get Rid of Unused Plugins
WordPress is well known for its extensibility. Thanks to plugins, you can add almost any functionality to your website.
But plugins come with a price. Because they are so easy to add to your website, you inevitably end up keeping ones you don’t use anymore.
There are two main reasons you should remove any unused plugins on your website:
- They add performance debt to your website.
- You are more prone to security issues.
Let’s tackle these factors one by one.
First, badly-coded plugins may cause performance issues on your website.
For instance, they might add unnecessary HTTP requests to provide their functionality. They can also slow down your website thanks to the bloat they generate in your database.
Unused plugins also increase the risk of security vulnerabilities. The fewer plugins you have, the less maintenance you must do to keep your plugins up-to-date.
To remove unused plugins, navigate to the Plugins menu item on your WordPress. Then take a good look at your plugins – one by one, put your hand on your heart, and ask these two questions:
- What is this plugin for?
- Do I need it?
For instance, I noticed I still had the Hello Dolly plugin on one of my websites.
Once I identified what it does, and if I needed it (“no”), I did the following:
1. I deactivated the plugin.
2. I deleted the plugin.
Now the Hello Dolly has become “Goodbye Dolly”, and I have one plugin less to care of.
3. Get Rid of Unused Themes
You may also have unused themes in your WordPress. That’s because it’s easy to install a theme for testing purposes and leave it there.
WordPress itself is responsible for the theme clutter, too. It comes with some default themes, so your theme gallery is populated with themes you don’t probably use.
To remove the unused themes, take these steps:
Go to Appearance > Themes in your admin dashboard to see a list of installed themes on your website.
Pick the one you want to eliminate by hovering your mouse over the theme thumbnail. Then click on the top of the thumbnail:
Click on the Delete link at the bottom-right of the opening view.
Before the deletion, you’ll see a prompt like this:
If you still think it’s a good idea to get rid of the theme, click OK.
4. Get Rid of Unnecessary Posts
You may even have unnecessary posts stored in your WordPress.
To remove them, all you have to do is to go to Posts view, hover your mouse over the preferred article, and click Trash:
That’s all there is to it.
5. Get Rid of Unnecessary Post Revisions
Every time you update your content, WordPress creates a revision of your post. Also, it auto-saves your draft every 60 seconds. Thanks to this feature, you can jump back to the older post version.
With these two operations, you have a hefty revision history for one blog post alone. Imagine how many you’d have if you had tens, hundreds, or even thousands of posts!
To access your post revision history, go to Posts > All Posts in WordPress and pick any existing post. Then choose Edit Post.
When you enter this view, take a look at the Revisions section at the right, under the Posts tab:
When you click the Revisions title, you’ll see the changes you have made:
The user interface is straightforward.
The red section indicates the original version of the content, and the green one is the updated one.
You can move from one version to another by dragging the slider on top of the UI. When you have found the version you want to use, click the Restore This Revision button.
While accessing post revisions is a great feature, it comes with a cost: They add unnecessary bloat to your database. And the bigger your database is, the longer it takes to back it up.
There are two ways to declutter revision history:
- Future ones: Control how many post revisions (if any) WordPress generates.
- The past ones: Clean the old revisions.
You can do both of these things by tweaking the code. But since I want to take a straightforward (and easy) approach, we have plugins that do the heavy work.
First, if you want to limit the number of revisions in your future posts. The easiest way to do this is to install the WP Revisions Control plugin.
Once the plugin is in place, go to Settings > Writing, and find the WP Revisions Control section. On the Posts field, enter the number of revisions you want to keep (the setting works with pages, too!):
Then click the Save Changes button to make the changes effective.
But what about the past revisions, and how do you handle them? No worries – there is another plugin for that called WP Sweep.
Once you have installed the plugin, head to Tools > Sweep in your WordPress. You can then find different items you can sweep, but for now, pay attention to the post section:
When you click on the Details button, you get more information about the items you can sweep.
If everything looks ok and you have backed up your site, click the Sweep button. And when you are ready, the view should look like this:
6. Get Rid of Unnecessary Pages
Removing unnecessary pages works the same way with posts.
To do this, select Pages in your WordPress, pick the page you want to get rid of, and finally, click Trash.
7. Get Rid of Unused Images
Next on our decluttering journey are the duplicate and unused images. Removing them is a two-step process:
- Stop WordPress from creating duplicate images in the first place.
- Remove unused images, either manually or using a plugin.
When you upload an image to Media Library, WordPress creates three versions: thumbnail, medium size, and large. Plugins and themes can also add their own set of images to your web host’s hard disk.
So how do you clear the unused images from your Media Library?
To stop WordPress from generating three image sizes per upload, go to Settings > Media. Then, in the Image Sizes section, turn all the values into zero:
You have now completed step one of our two-step process!
The second step is to remove the images you don’t use anymore. You can do this by opening Media > Library. Then, choose the list option:
The library now opens in a more-readable list format. Tick the checkbox in front of the row, and in the Bulk actions dropdown, choose to Delete permanently.
While the manual approach works, going through the library like this is a huge burden. Instead, use a plugin to speed up the process. This way, time-saving is imminent, especially if you have an extensive library of images.
In my case, I chose WP Optimize (the premium version) as the workhorse in this task. While it can do all sorts of optimization tasks, it also has a proper image removal tool.
After installing the plugin, go to WP-Optimize > Images > Unused images and sizes. From there, pick the Scan website for unused images option. For instance, here is a partial look of my scan results:
You can choose whether to dump the selected images into the trash or remove them altogether.
I recommend you move them into the trash first and then check your website carefully so that it works ok. If it does, it’s safe to remove the trashed images for good.
If you are using a page builder, pay extra attention to the scan results. For instance, WP Optimize suggested I should remove images that were actually in use.
So take the warning seriously, and make sure you have your backups available before deleting any images!
8. Get Rid of Unnecessary User Accounts
You can grant users access to your WordPress installation. This feature is handy because sometimes you may want to let an outsider access your Admin panel.
For instance, in the past, I had issues with one of my WordPress plugins.
I couldn’t figure out the solution myself, so I asked the plugin’s vendor for help. The customer support person then asked me to give them access to my WordPress admin area so that they could take a look at the issue.
User accounts are powerful, but they can also pose a security risk if you are not careful. To mitigate the risk, you should remove unused user accounts.
Fortunately, getting rid of inactive users is easy. All you have to do is to go to Users, where you can see the list of user accounts.
Just tick the checkbox in front of the account you don’t need. Then choose Delete in the Bulk actions dropdown, and click the Apply button.
If you still want to move ahead and delete the user, click the Confirm Deletion button, and the account is gone.
Removing unused users is not a one-time task, as any of the actions in this post. So make sure to build a routine for deleting inactive accounts every now and then.
9. Get Rid of Spam Comments
I wouldn’t believe you if you told me you don’t get any spam comments on your website. I get them, and you get them. Everyone gets them.
Spam comments are a nuisance, but they are manageable.
First, you can tackle the spammy comments by going to the Spam section in Comments and going to the Spam tab:
From there, you can see the list of spam comments you have on your website. Process the list of comments and delete them by ticking the check box in front of the row. Then choose to Delete permanently on the Bulk actions menu.
If you are sure that all the comments are spam, you can click on the Empty Spam button. This action takes care of all the spam instantly.
Another way to handle unwanted comments is to use a tool, and for WordPress, there are plenty.
Akismet is a spam-fighting tool, and it comes automatically with WordPress installation. Yet, my favorite is CleanTalk. It’s a premium tool that costs $12/year on one website.
After you have installed CleanTalk, it checks the incoming comments and marks the unwanted ones as spam.
But no tool is perfect.
Your job is to check all the comments flagged as spam. This way, you can ensure that no valid comments slip into the sea of spam.
You can also make the spammy comments disappear automatically after 15 days. Go to Settings > Anti-Spam by CleanTalk, and click Advanced Settings at the bottom.
So Now I’m Done for Good? Not Quite…
After following the steps in this article, you may think you don’t have to do any WordPress cleaning from now on. Umm… not quite.
What you should do next is to turn these nine steps into a routine that you handle frequently. Clutter is, after all, an infinite natural resource. So no matter how much you fight against it, it keeps creeping back in, bit by bit.
To help you remember to do this ongoing task, use an online to-do list tool and mark it as a regular operation. Here’s how I would do in Todoist (my tool of choice):
- 9 Ways to Clean Up Your WordPress (+ What To Do Next) - December 3, 2022
- Gutenberg Tutorial: How to Remove a Block (3 Ways) - November 26, 2022
- How to Choose a Plugin: 7 Steps to Get the Right One for Your WordPress Website - November 21, 2022