WordPress post revision feature have evolved since the release 2.6 of WordPress and sometimes it can be overwhelming while some people don’t find it useful. WordPress post revision is a handy feature which keeps tracks of changes in your posts ensuring that all your content saved periodically. Giving you the ability to simply revert back to an earlier version of the same post/page easily.
In this article we’ll show you how to disable or limit WordPress post revision feature if you don’t find it useful. This will also reduce the database size. So smaller the database size, faster your site will be.
We are talking about two things. One is limiting or disabling WordPress post revisions and the second one is cleaning WordPress post revisions using a plugin.
Limit WordPress Post Revisions
By default, there are no limits of revisions. Imagine about a website which has 500 posts and 20 revisions per each. If you do the math that’s 10000 unwanted entries in your database. That’s big.
Also If you find this feature is still helpful but you might consider having a limited number of revisions, you can limit the number of post revisions by adding this code on
This above code will save only 5 revisions. You can change the number according to your preferences. Changing this number to a lower value would be a good idea.
Disable WordPress Post Revisions
You can completely disable WordPress post revisions by adding this code in your
When you are editing the
wp-config.php file make sure everything is placed above the line where it says
/* That's all, stop editing! Happy blogging. */.
Clean Up Post Revisions Using WP Optimize Plugin
Obviously there are few manual methods to accomplish this but we advice you to use a plugin without touching the database itself.
First thing you have to do is install and activate this plugin WP Optimize Plugin.
Once you are done you can find it’s settings page at the left side of your dashboard called “WP Optimize”. When you click on it, a new page will appear like the image below.
As you can see there are few options you can select. Either you can select multiple options and click on “Run all selected optimizations now” button while “Clean all post revisions” option is selected. Or you can optimize clicking on individual buttons just to make sure you don’t touch other settings and get things messed up.