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.
How to delete WordPress revisions
Follow the quick and easy steps below to delete old WordPress revisions that have probably been laying around in your database for a long time.
In this tutorial, we are using our premium Perfmatters plugin. We’ve developed our database optimization feature to be as lightweight as possible, while still giving you the options you need.
If you are looking for a free solution, WP-Optimize is also good. Be careful when searching for plugins that delete post/page revisions. Some of these plugins can cause a lot of damage. Some are even banned from certain hosts due to the amount of overhead they have on your site.
Step 1
No matter how good your WordPress plugin is, it’s always recommended to take a backup of your site before doing any operation that deletes data. If you are using a premium hosting provider like Kinsta, you can quickly take a snapshot of your site. This way you can rollback with a single click if needed. Otherwise, there are free WordPress backup plugins you could use.
Step 2
After you have a WordPress backup, click into the Perfmatters plugin settings.
Step 3
Click the “Extras” tab and then click “Database.”
Step 4
Toggle on “Post Revisions.” The number of revisions found will show up to the right of it. This also includes page revisions and custom post types. In this example, you can see there are 322 revisions.
Step 5
Scroll down and click “Optimize Now.”
The process will run in the background. You don’t need to stay in the plugin while it’s running or worry about leaving the window open. It will and let you when it’s finished with a notification at the top of the Perfmatters plugin settings.
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 1,500+ revisions.
Summary
It’s important that you give your site’s database a little TLC from time to time.
Was this tutorial on how to delete WordPress post revisions helpful? If so, let me know below in the comments.
Hi there. Thanks for this article, however, I’m wondering if you’ve tried this on a WP network install, and if so, was everything good?
Hi Mark, thanks for your comment. I actually use this plugin now: https://woorkup.com/perfmatters-review/ The previous one mentioned above hadn’t been updated by the developer for some time now. I will make a note to update this post with the new plugin details. Thanks
Hi!
Great article!
However……..can I use this plugin to delete Page revisions? Probably a stupid question, but everything seems to relate to Posts.
Sorry, yes this also deletes page revisions. I will be updating the post above shortly.
Are you aware of any issues with using this plugin on a Thesis theme (1.86, the older version)?
I am not, you could also try this plugin too which has some newer updates to it: https://woorkup.com/perfmatters-review/ Both work great.
THANKS Brian. Much appreciated!
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.
Have you ever found a solution for this?
I’m still looking.
*skeleton sitting at computer .jpg*
Hi, How to remove page revisions?
Hey Rashi,
The above tutorial includes cleaning up post revisions, page revisions, and revisions for custom post types.
Thanks for this. It’s been harder than expected to find current, and reliable plugin to delete revisions. Just installed and used WP Optimize based on your recommendation. Perfect!
Great Chris! Glad the WP-Optimize recommendation helped. If you get a chance to try out our Perfmatters plugin, I would love to know what you think.