Main Content

How to reduce the size of your WordPress database.

WordPress DatabaseWhat’s in your WordPress database that you don’t need? Have you ever ran through it and cleaned it up? Probably not. I recently did and it found 8.338 MB of unused stuff.

It’s easy to do too. I use the Optimize Database after Deleting Revisions plugin.

Most of my cleanup came from removing post revisions. By default, WordPress saves post revisions for all your pages and posts. This is really handy, but lets face it, after about a month you don’t care about those revisions anymore. Even if you do want to keep them, you probably don’t need more than a few.

When I ran the plugin, I saved the 5 most recent revisions. Turns out, I had a ton of revisions too. One post alone had 36 revisions removed. In total, I removed 811 post revisions. Now, I still have a lot left (as I a saved 5 per post) but I did remove a ton of data I didn’t need.

The plugin also removed 1409 postmeta orphans, 18 transients, 29 spam comments, and 4 unused tags.

Plus it optimized my database which is nice.

After it was all done, it removed 8.338 MB in my database. Now that’s a lot of space. All in all I spent less than 5 minutes installing, configuring, and running the plugin.

Now WordPress is happier which makes me happier. I should probably schedule this to run once a month too.

As always, backup your WordPress before you run a plugin like this, but so far I haven’t had any issues and I’ve used it on many sites.


Leave a Reply