Limiting, removing and disabling WordPress revisions

To disable revisions (publications) in WordPress, add one line to the wp-config.php file:

define('WP_POST_REVISIONS', 0);

or:

define('WP_POST_REVISIONS', false);

Second option change true to false in /wp-includes/default-constants.php

if ( !defined('WP_POST_REVISIONS') )
   define('WP_POST_REVISIONS', false);

To limit the number of revisions (publications), specify a number instead of true or false.

To delete revisions (publications), execute a query in the database:

DELETE FROM wp_posts WHERE post_type = "revision";

You can also use a plugin to manage the cleanup of revisions (publications), there are quite a few of them.

I want to note that disabling revisions is not advisable, since they allow you to track changes in the article and thereby make a backup copy.

Leave a comment

Leave a Reply