WordPress

The Complete Guide to Cleaning Up Your WordPress Website

Dirt, grime, and that ughhh-inducing ring around the bathtub — we’re all familiar with pesky build-ups. Your bathroom isn’t the only place that needs a regular scrub, though.

Your WordPress website could also do with a little sudsing.

That’s because your site grows over time, acquiring new content, media files, users, themes, plugins, and more. These are all good things, of course, but they can make your site a bit cluttered. So you’ll want to periodically go through your site and perform some basic clean-up tasks. It shouldn’t take you very long, and the result will be a site that’s faster and easier to use — both for you and your visitors.

In this guide, we’ll talk about why your WordPress website needs a little housekeeping from time to time. Then we’ll walk you through some smart ways to clean it up. So grab a (digital) mop. We’re gonna swab this deck.

via GIPHY

Why It’s Important to Clean Up Your Site Periodically

Over time, your site can collect lots of clutter in various forms.

When you first build your WordPress site, it will be pretty lightweight. Over time, however, you’ll probably add a lot of files and data. You’ll create content, add new plugins and themes, and maybe even tweak the coding in core files.

All of this causes your site to grow in size. This matters because when someone needs to access your site, the time it takes to load and perform crucial functions depends on how much data needs to be processed. A bloated site can, therefore, lead to slower loading times, which is very bad for the users’ experience. It can even make managing your site more difficult, thanks to similar stresses on the back end.

For this reason, it’s smart to spend some time cleaning up your site. By clearing out unnecessary data and content, optimizing images and files, and so on, you can improve performance without removing anything essential. At the same time, you can perform valuable maintenance tasks such as checking for broken links and making sure everything is up-to-date.

How often you do this will depend on your site and the systems you have in place. Larger sites that add new content frequently will naturally end up with more bloat that needs to be cleared away. Plus, if you have automated functionality set up that cleans parts of your site on a regular basis, you won’t have to go through it manually as often (we’ll discuss some tools that do this below).

Of course, you’ll also want to do everything you can to speed up your site in other ways. For instance, opting for a WordPress-specific hosting plan like DreamPress is a smart way to increase performance!

12 Ways to Clean Up Your WordPress Website

Now, let’s talk about how to clean up your site. These 12 methods are useful for any WordPress site, particularly one that’s been around for a while. Some options we’ve featured are one-time fixes, while others should be performed on a regular basis.

Before implementing any of these techniques, you’ll want to make sure you have a recent backup of your site in place. Then, we recommend working your way through the list one at a time. This process may take a while, but the benefits of a cleaned-up website are well worth it.

1. Clear Out Unneeded Themes and Plugins

Too many plugins and themes can clutter up your site unnecessarily.

Plugins and themes are excellent resources. Often, you’ll find yourself adding dozens to your site over time. However, this can put unnecessary strain on your site, especially if you don’t actually need all of them. With themes, you’ll just want to go through and remove any that you aren’t currently using. Don’t forget to delete each one, not just deactivate them.

As for plugins, it’s also a good idea to go through and remove any that you don’t really need. However, you might not be sure how to determine which plugins you should keep. It may be helpful to employ Marie Kondo’s approach to cleaning out physical clutter in your life, as described in her book The Life-Changing Magic of Tidying Up. Kondo’s method is to look at each object and ask the question: “Does interacting with this item spark joy anymore?”

It may seem odd to look at plugins this way, but it can be eye-opening. Go through each of your plugins, and ask yourself if you are really excited about the functionality it provides. If you don’t love one of your plugins, then it may be time to let it go.

2. Make Sure Everything Is Updated

It’s important that WordPress, themes, and plugins are always updated to their latest versions.

Keeping your site updated is key to ensuring that it runs smoothly and performs well. Old versions of software cause all sorts of problems. They can have security holes, create compatibility errors with other tools installed on your site, and simply bog things down.

For this reason, it’s worthwhile to make sure that everything on your site is up-to-date. You’ll want to start with WordPress itself. While smaller patches are installed automatically, you’ll need to install larger updates manually. Fortunately, this process can be accomplished with a single click.

Next, you’ll want to make sure all of your existing plugins and themes are also updated. Again, this is very simple. All you need to do is go to the Plugins and Themes sections of your WordPress dashboard, look for any with a message about needing to be updated, and click on Update Now.

Going forward, it’s best to continue performing these kinds of updates as soon as they become available. If you’re lucky, your hosting plan may even configure automatic updates for you!

3. Get Rid of Old Post Revisions

A plugin like Optimize Database after Deleting Revisions can clear out unneeded content quickly.

Plugins and themes aren’t the only data that clutters up your site. Old revisions of posts also stick around and create bloat. Most of the time, you’ll never need those revisions, especially once you’ve stopped working on a particular post.

While WordPress doesn’t provide an easy way to delete old post revisions by default, you can do this easily using a plugin. For example, Optimize Database after Deleting Revisions enables you to decide exactly which revisions to keep and which to discard. It also provides several other useful cleanup features for deleting spammed comments and unused tags.

To prevent revisions from building up and cluttering your site again, you have two options. First, you can install a plugin such as Revision Control, which lets you limit how many revisions are saved. Alternately, you can disable revisions completely by adding a little code to your site’s wp-config.php file.

4. Delete Media Files That Aren’t Being Used

On most established sites, there are plenty of files in the Media Library that aren’t in use.

Media files — such as images, GIFs, and videos — can take up a lot of space. This can be a problem if you have a lot of old media files on your site that are no longer used, such as images from deleted posts and pages.

You can go through your WordPress Media Library and delete unused images manually. Unfortunately, this is often a time-consuming process. Media Cleaner is a handy tool that simplifies this cleanup task for you, by automatically clearing out media files that aren’t used in any content. It will move them to a temporary trash folder so you can approve each deletion.

To prevent unused media files from becoming a problem in the future, you’ll need to be vigilant while you work on your site. Every time you update an image or delete a piece of content, it’s smart to immediately remove unneeded media files from your library. That way, you can hopefully avoid the need to ever go through dozens or hundreds of files at once.

5. Optimize Your Images

After clearing out unneeded media files from your site, you should have a leaner Media Library. However, you’ll also want to pay attention to the files you’re keeping around. Media that isn’t properly optimized can slow your site down just as much as having too many files in the first place.

Fortunately, there are plenty of ways to optimize your images — in other words, to make the file sizes smaller — without negatively impacting their quality. WordPress does perform some image compression automatically, and you can tweak how it does that using a little code.

You can also optimize images before uploading them, by downloading an offline optimization tool that will enable you to reduce file sizes manually. This can become unwieldy if you upload a lot of media files or if there are many old files that need attention.

In that case, a plugin can do the trick. There are a lot of options available, including:

  • Jetpack Image CDN: This is a service that hosts your images in the WordPress.com cloud and edits them for optimal speed.
  • EWWW Image Optimizer: This handy plugin optimizes your images 100 percent locally without the need to go through any third-party service.
  • Compress JPEG & PNG images: With this simple tool, you can optimize all JPG and PNG images on your site with ease.
  • Smush Image Compression and Optimization: Finally, this popular plugin is very customizable, and compatible with a lot of the major media library plugins.

No matter what tool you pick, you’ll want to look for one that will automatically optimize your existing media, as well as all new files that are added to your site. That way, you may never need to perform this particular cleanup task again.

6. Fix Broken Links

When visitors encounter broken links, it’s likely to lower their opinion of your site.

Some of the most vital cleanup tasks are less about boosting your site’s performance, and more about ensuring that the user experience is strong. For example, over time some links may cease to work because the content they lead to has been moved or deleted. These broken links can be frustrating for visitors and can make your site appear less reliable.

If you want, you can choose to clean up your links manually. You’ll simply need to go through each piece of content, clicking on every link and making sure it leads to a valid page (and replacing the ones that don’t). A side benefit of this approach is that it gives you the chance to make sure all your links lead to the best resources possible.

If you have a lot of content, however, this process could take days. In that case, you may want to install a plugin like Broken Link Checker. This tool alerts you to any links that are no longer working. It will also continue to do this automatically, which means you won’t have to worry about broken links moving forward. Remember, though, this can spin up your CPU and cause your site to be slow so be careful about when you run it and how often.

7. Update Your User Information

Old accounts simply take up space and make managing your users more challenging.

When considering areas of your site that need to be cleaned up, it’s easy to overlook your user information. However, that would be a mistake. User data clutters up your site just like anything else, and old or incorrect information can lead to confusion.

It’s smart to go through and make sure everything is up-to-date, especially if you have more than a few users registered on your site. You’ll want to:

  • Delete old users who no longer need their accounts.
  • Make sure information is updated and correct for all current users.
  • Ensure that everyone has the correct permissions level for their job.

The more users your site has, the more often you’ll want to perform this particular cleanup task.

8. Clean Up Your Database

If you have a hosting account with DreamHost, you can manage your databases through your panel.

Much of the clutter that collects on your site remains behind-the-scenes, stored away in your site’s database. This particular bloat may be less noticeable, but it can have a powerful impact on your site’s performance. Just as with your plugins, revisions, and media files, not everything in your database is actually necessary.

It is possible to clean up your database manually. However, this requires some significant know-how, and it’s easy to accidentally delete important files. For most users, a plugin solution is a better choice. There are many plugins that clean up your database for you, removing unneeded data without deleting anything important. A tool such as WP-Optimize will not only clear out your database now but keep it running lean in the future.

9. Disable Assets From Loading on Unnecessary Pages

WP Asset CleanUp is a plugin that enables you to speed up your pages’ load times.

Most of the tips on this list deal with deleting unnecessary information from your site. This technique, on the other hand, helps to speed up your site by preventing unnecessary information from loading when users access its pages.

Plugins, themes, and similar tools have to load various assets to perform their functions. This can have a negative impact on your site’s performance, especially when assets are being loaded in places where they aren’t needed. For example, imagine you have a plugin that adds image gallery functionality to your site, but there’s only one page on your site that includes such a gallery. All of those plugin’s assets might still be loaded on every page, whether or not they’re needed.

Dealing with this kind of asset clutter involves a somewhat more advanced technique. You can make the process easier on yourself by using a plugin like WP Asset CleanUp. This tool will scan each page individually, determine what assets are loaded, and let you decide which ones to disable.

10. Eliminate Unused Tags

It’s likely that not every tag on your site is serving a useful purpose.

If you regularly use tags to organize your posts, you can end up with several you don’t need. You may have tags that aren’t used on any posts or multiple tags that aren’t distinct enough to be useful (for example, “WordPress plugins” and “plugins in WordPress”). Clearing out the tags you don’t need is a smart way to reduce some clutter.

This is one task where the manual approach is simple to the point where a plugin isn’t really necessary. If you navigate to Posts > Tags in your WordPress dashboard, you’ll see a Count number for each tag. You can delete any tag with a count of 0, since it isn’t being used. Plus, you can look for tags that are too similar, delete all but one version, and re-assign any relevant posts to the tag you’re keeping. It’s worth bearing in mind that you can also do this with categories if the need arises.

11. Deal With Spam Comments

It isn’t enough to block spam on your site — you have to actually delete it too.

Spam is a real problem on most websites, WordPress or not. You’re probably aware that it poses security risks, such as when bots use spam to post malicious links on your content. However, old spam comments also clutter up your site and can bog down its performance.

It’s likely that you already have a spam solution installed. Akismet, for example, is a handy spam-fighting plugin that’s installed by default on many WordPress sites. This kind of tool will keep most spam from appearing on your site’s front end but won’t remove it. Instead, flagged comments will simply be moved to the Spam folder.

Periodically, you’ll want to navigate to the Comments section of your WordPress dashboard and delete everything in that spam folder. How often you do this depends entirely on how many spam comments you tend to get. You can even install a plugin such as Spam Comments Cleaner to automate the process, so you don’t have to keep repeating this task.

12. Conduct a Thorough Content Review

Every piece of content on your site should serve a purpose and represent your best efforts.

The final cleanup task you’ll want to perform is to go through all of the content on your site. If you’ve been following along, you’ve already done a few things to update your content, such as fixing broken links and optimizing images. However, it’s also worth conducting a full content review.

By this, we mean working your way through each existing post, page, and so on, looking for the following things:

  • Content that is out of date or irrelevant now and needs to be deleted.
  • Information that needs to be updated (in particular, check your About and Contact pages).
  • Poor-quality content that’s better off removed or replaced.
  • Content that is too similar (for instance, if you have two posts on identical subjects, you may want to only keep the best one).

This will take some time, especially if there’s a lot to go through. Still, we highly recommend doing this at least once a year. If you’re truly dedicated, you can even read through each piece of content with an eye towards making improvements, updating images, improving articles that are less than stellar, and so on.

Conclusion

It can be easy to get so wrapped up in creating new content for your site that you forget to perform routine maintenance. If you don’t clean up your site regularly, however, you’re likely to end up with a cluttered back end and poor performance on the front end. Tidying things up on occasion is a smart way to keep that from happening.

Many of the most crucial cleanup tasks involve clearing out unneeded tools and data. This means deleting themes and plugins you don’t need, removing unused images and tags, and getting rid of old post revisions. You’ll also want to make sure everything on your site is up-to-date — including content, user information, and even WordPress itself. Then you can move on to more advanced techniques, such as clearing out your database.

And just remember, cleaning up your WordPress site is way more fun than scrubbing that ring-around-the-tub. Just saying.

About the author

Megan Hendrickson

Megan started her career in women's magazines, but after authoring waaaay too many "Walk Off the Weight" columns, she merged into the tech lane. She writes and edits for DreamHost and shares an inordinate amount of WordPress content on Twitter.