How to Control Post Revisions in WordPress

WordPress saves posts to draft and create a revision each time when you save a post as draft in the database. However, there is not any limit to these revisions at all. The more you create posts, the more post revisions will be there in the database. In order to control post revisions in WordPress,WordPress gives us a neat and tidy way to do it.

Limit the number of posts revisions that WordPress stores in the database. Open up your wp-config.php which is located in the root directory of your WordPress installation and add up the following line of code in that file.

define( 'WP_POST_REVISIONS', 3 );

In the above snippet the number 3 is the number of post revisions. After defining the above code in the specified file, the WordPress will limit the post revisions to 3 rather than unlimited.

Control Post Revisions in WordPress

Or You can also use a WordPress plugin to do the same job. And the WP-Optimize is great plugin for it.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *