How to Clean Your WordPress Database

The easiest way to clean the garbage out of your WordPress database is to use a plugin that does it for you. You don’t have to be a database expert to clean out some of the clutter out of your WordPress database if you follow these simple steps.

First, Why Clean Your WordPress Database?

So you already had the idea of cleaning your WordPress database, but do you know why this is is a smart decision? After your WordPress website has seen a few years of consistent use, there are undoubtedly many post revisions, deleted comments, and other content that is no longer necessary to hold onto. There is probably even data in your database from plugins and themes you haven’t used for years! The bad thing about this is that a bloated WordPress database will slow down your website, which has a direct, negative impact on your SEO ranking. Now you know the why, let’s talk about the how.

How to Clean Your WordPress Database

Required Plugins:

  • Database Cleaner: Clean, Optimize & Repair
  • UpdraftPlus WordPress Backup plugin (or other database backup/restore plugin or functionality)

How to Use Database Cleaner by Meow Apps to Clean Your WordPress Database

Install the Database Cleaner Plugin

First, install and activate the Database Cleaner plugin by Meow Apps.

Take a Full Backup of Your Database (Very Important!)

updraftplus backup main page

Make sure to save a backup of your database before doing anything with the Database Cleaner plugin. If you don’t have a way to save your database and restore it again from the saved backup, use the UpdraftPlus WordPress Backup plugin.

This is a very important step! Without a backup, you may need to hire someone to fix your website if something goes wrong while cleaning your database! Please make sure to always keep a backup when making changes to the database manually, like cleaning it. (And don’t think this step is only for amateurs who make bad decisions, backups are what pros do, because they know how important a backup can be!)

Check Your Database Size Before Making Any Changes

This step isn’t super important, but if you want to know how effective the Database Cleaner plugin was in the following steps, you kind of need to know how big the database was before you did anything, right?

Check the database size by clicking the refresh arrow in the top bar on the Database Cleaner page. The refresh arrow is near the database icon and a history of database sizes. Click that button to get a current view of how large your database is.

Turn on Expert Mode

In the top bar of the Database Cleaner page, there’s a slider button that says “Easy”. Click that and it will say “Expert”. I know that word sounds scary, but in this case we need to switch to the Expert mode to make any considerable improvements to your database size. Remember, this is why you made a backup of your database in a previous step!

Auto Clean Deleted Posts and Other Unnecessary Junk

database cleaner main page

In the top bar of the Database Cleaner page, click the big blue Auto Clean button. This will delete post revisions, auto drafts, deleted posts, deleted or spam comments, and data that has been orphaned from other data it used to be associated with. These are different kinds of data that WordPress tends to collect over time and doesn’t necessarily need to hold onto. The default is to delete all of these, except anything within these categories that are less than 7 days old (you can change this in the settings tab of the Database Cleaner page).

Click that refresh arrow again in the top right corner of the Database Cleaner page, to see how much data was removed from your database in this step!

Optimize Your WordPress Database Tables

database cleaner tables optimize

Now click on the Tables tab in the Database Cleaner page. Near the “Tables” header you should see another slider button that says “Clean”. Go ahead and click that and it will change to “Optimize”. Now check the checkmark next to every table you would like to optimize, or just the one at the top of the table list to select them all, and click the “Optimize” button at the top right of the tables list.

Click that refresh arrow again in the top right corner of the Database Cleaner page, to see how much data was removed from your database in this step!

Test Your Website for Errors

Now that you’ve made significant changes to your website database, you need to test your WordPress website to make sure nothing is broken! Go to several different places in your admin area, such as the settings pages for various plugins. Try changing a setting in a plugin to make sure no errors show up. Then go to the front end of your website and load a few of your pages to make sure everything seems in order there too. Be sure to test your most important customer-facing pages.

If everything seems in order, that’s great! If something wrong seems to be happening, go back to your UpdraftPlus Backups area and restore the backup you made in the second step of these instructions. You can try again to optimize your database, only this time try only using the Auto Clean function of the Database Cleaner plugin. Test your website again by visiting all of the pages mentioned above, and see if the problem still occurs.

For Additional Database Speedup Help, Ask an Expert!

A tablet shows a rocket taking off, with the WordPress logo on the rocket.

Unfortunately, this is as much as I can safely recommend you do with the Database Backup plugin, unless you have experience previously managing a WordPress database. However, there is still a lot more room for improvement. Your website may have a ton of options from previously installed plugins and themes being loaded every time a page on your website loads. To fix this, though, you need an expert’s touch. For further optimization, and page speed increases, please contact a professional.

Comments on "How to Clean Your WordPress Database"

Leave the first comment


X

Be in the Know

Subscribe to be in the know about new articles and giveaways, like free Bricks Builder templates. The most I will email you is once every two weeks.