WordPress post revision is one excellent feature of WordPress that allow you to take progressive backups of your post each time you save or publish it. Besides the manual saving each time you update, the autosave feature will also take a backup of your post. This means that even if you forgot to save or something happened and you could not save, your content will be saved automatically.
These are called WordPress post versions or revisions rather than backups. Each version stores the changes between posts.
Since WordPress 3.6, the post revision feature has been enhanced and now allows you to compare two different revisions that you’ve saved previously. It also highlights the difference between two revisions and even allows you to easily switch between the revisions using the slider bar at the top.
The problem with post revisions
In reality, you might not actually need that much amount of revisions being saved on your server. In addition, if you are on shared hosting with limited database size, chances are you easily get run out of the database space as it saves multiple versions of your posts.
In this post, we’ll guide you how to reduce the number of post revisions got each post that being stored on your database.
Reducing the number of post revisions
According to Mike Little, the co-founder of WordPress, “WordPress’ database queries do *not* retrieve revisions, so the number of revisions has no effect on the queries. The only time the revisions are retrieved is on the edit page of the individual post. There is no impact on the front end speed of your site.”
Though the front end of speed of your site will not get affected with the number of revisions, people still love to reduce the number of revisions being stored on the database as most of them are using WordPress under limited database storage.
Simply copy the below code snippet to your wp-config.php to limit only 3 revisions to be saved on each post:
define( 'WP_POST_REVISIONS', 3 );
Although, the post revision is one of the greatest features, some people prefer not to have this feature at all. If you are among those who don’t want any revisions to be saved on your database, you may add the following code snippet to your wp-config.php file.
define( 'WP_POST_REVISIONS', false);
Do you find the post revision as a life saving feature? Share your story with us by commenting below.