Home ยป How to disable or limit WordPress post revisions?

How to disable or limit WordPress post revisions?

In WordPress tool, designer of WordPress has kept a revisions feature to maintain the post integrity. This is one of powerful feature that any writer can track post update. But there is also one popular discussion always happens related to storing multiple post revisions slows down the websites performance, which is not true. the designer and developer of WordPress has written this tool smart enough to ignore revisions while rendering the post at front end. However, defiantly keeping post revisions take space in WordPress database.

So if you want to decrease/restrict the size of your WordPress database, removing your post revisions is the best way to do it without impacting original posts.

To restrict the revisions, you can modify the wp-config.php file.

Open the WordPress wp-config.php file in editor and add the following configuration line:

define('WP_POST_REVISIONS', false );

Once this line added in to the wp-config.php file, WordPress will stop storing new post revisions.

Also if you don’t want to disable the full WordPress revisions functionality, there is option to set a limit of how many revisions should be stored and maintained.
This can be archived by adding the following line in the wp-config.php file:

define('WP_POST_REVISIONS', 5 );

By using above code, you can maintain 5 copies of revisions for each post.