WordPress automatically saves revisions when you are working on posts and pages. By default, there is no limit in place, so it’s not surprising that these can begin to add up pretty quickly.
For example, a client of ours recently had 239 revisions for one page and about 600 pages total across their site. If you do the math, that could be an additional 143,400 entries in the site’s database.
Because of that, we have a feature in Perfmatters that allows you to disable or limit on the number of revisions on your WordPress site. While we recommend doing that, it doesn’t help you delete existing or new revisions from your database. But our database optimization feature lets you do just that.
Delete WordPress post revisions
Follow the steps below on how to delete WordPress post revisions on your site. Revisions include posts, pages, and custom post types.
Important: These functions make permanent changes that cannot be reverted! Back up your database before proceeding.
Step 1
Click into the Perfmatters plugin settings.
Step 2
Click on the “Tools” submenu.
Step 3
Click on the “Database” submenu.
Step 4
Toggle on “Post Revisions.” The number of revisions found will show up to the right of it.
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 let you know when it’s finished with a notification at the top of the Perfmatters plugin settings.
Check out our documentation on WordPress database optimization for other easy ways to clean up your database with Perfmatters. You can also delete your WordPress post revisions on an automated schedule.