How To Limit Or Entirely Turn Off Post Revisions In WordPress ?

Post revisions lets you tract post changes and revert them back easily but they populates your site _posts table and increases its size. This tutorial contains two simple wp-config.php file hacks you can use for turning off or limiting your posts revisions.

wp-config.php file is locayed in your site’s root directory. Open it for editing and use the following linses of code.

For disabling post revisions add the following line:

define( 'WP_POST_REVISIONS', false);

And use the following line for limiting the post revisions, following line of code limit the post revisions to 3 but you can change this number as per your requirement:

define( 'WP_POST_REVISIONS', 3);

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.