We are ready to present you a brand new WordPress hack. Today we’ll be dealing with posts revisions count reduction.
What is posts revisions? It is a feature introduced in WordPress 2.6. Whenever you or WordPress saves a post or a page, it automatically creates a revision and stores in your WordPress database.
Why should we reduce their count? Each additional revision will slowly increase the size of your WordPress database. If you save a post or page multiple times, your number of revisions will greatly increase overtime. For example, if you have 100 posts and each post has 10 revisions you could be storing up to 1,000 copies of older data!
So if you need keep your website fast and optimized, do not hesitate to use the advice we are going to present you below.
To reduce post revisions, you need to go to the root of your WordPress installation using cPanel File Manager or FTP. The file you will need to edit is named wp-config.php Open this file and copy this string of code to it:
Where X should be replaced with the number of the revisions you’d like to have.
Note! It is recommended to copy this command to the first line under the initial block comment in wp-config.php.
Now if you save the changes and refresh your WP Dashboard that should be it. No more redundant data and no issues with website load speed.