Disable WordPress Post Revisions

  • Avinash
  • 1
  • Jul 15, 2011
  • Web Development

While adding the post or pages in wordpress, it will automatically save your posts/pages to make sure that your changes should not lost.

WordPress store this auto saved versions as a revisions in the post table. We can manage this autosave interval as well.

To know more about this post auto save interval, check out our atricle.

But what if you want limit the number of revisions per post or want to disable this post revisions facility.

Don’t worry, you don’t have to make any changes in wordpress code. You can manage this with wp-config.php file only.

Please find below code snippet for limit the number of revisions or disable the post revision facility.

Limit the Number of Revision:

define('WP_POST_REVISIONS', 3); // This will store only 3 revisions of any posts.
define('WP_POST_REVISIONS', 3);
// This will store only 3 revisions of any posts.

Disable Post Revisions:

define('WP_POST_REVISIONS', false ); // This will disable wordpress post revision feature.
define('WP_POST_REVISIONS', false );
// This will disable wordpress post revision feature.

Note: If we do not set this value in wp-config.php file, then it is default set to TRUE.

Related Posts

Written by Avinash

Avinash Zala is leading various projects which deals with the various technology involved with the web. A combination of perfect technical and management skills. Avinash would like to chat with you and convert your imagination into the working system. You can get in touch with him on Facebook and Twitter.

View all posts by: