How to Delete Old WordPress Revisions from your DB

Delete Old WordPress Revisions

In a previous post I wrote about how to how to disable and limit WordPress post revisions. In this post I will show you how to delete your old WordPress revisions and clean up/optimize your database. This ensures that your site keeps running at optimal performance. Neil Patel has a great infographic about how load time affects Google rankings.

Step 1

First we are going to grab the free WordPress plugin WP-Optimize, developed by Ruhani Rabin. As of writing this the plugin has over 500,000+ active installs with a 4.8 out of 5 star rating.

wp-optimize plugin

Be careful when searching for plugins that delete post/page revisions. Some of these plugins can cause a lot of damage. I have personally used this one on a lot of sites and can vouch for it and the developers. I have never had any problems with it. But as always I recommend backing up your database before running this plugin. (I personally use VaultPress so I never have to worry; on top of my host’s backups)

Step 2

Once you have installed it click into WP-Optimize on your sidebar within your WordPress dashboard.

wp optimize delete WordPress revisions

Step 3

You now have a couple options. The most important ones here are “clean up post revisions” and also I recommend checking “optimize database tables.” You can also check the additional ones to clean up auto drafts, spam comments, etc. I personally always run the 5 options as shown below. When you are ready, click on “Process.”

clean up post revisions

You will then see a confirmation of the everything that has been deleted, such as post revisions, auto drafts, etc.

confirmation of post revisions deleted

And that’s it, your done! You can remove the plugin if you want. I usually install it to cleanup my WordPress revisions and then uninstall.

I have seen dramatic speed increases by doing this on client’s sites that haven’t limited the number of revisions in WordPress. Some of them cleaning up more than 1,500+ revisions.

As always feel free to comment below!

GET MORE STUFF LIKE THIS

Marketing, WordPress, Blogging Tips, SEO and Reviews, once a week.

Thank you for subscribing.

Something went wrong.

9 thoughts on “How to Delete Old WordPress Revisions from your DB

  1. Hi!

    Great article!

    However……..can I use this plugin to delete Page revisions? Probably a stupid question, but everything seems to relate to Posts.

  2. Hello friends, suppose there are 15 revisions of a post. And we want to save the last two revisions with the published post; that means there will now be three copies of the post: one – published and two – most recent revisions; i want to know if we can configure the pluggin to delete the desired number of revisions instead of deleting all of those.

Leave a Comment

199 Shares
Tweet
Share
Share
Buffer