Disable Post Revisions in WordPress

WordPress includes functionality that lets you track changes to posts and restore previous versions (Post Revisions). However, these increase the size of the wp_posts table in the database since each revision is another row.

To disable the revision saving functionality in WordPress, add the following line to your wp-config.php file:

define( 'WP_POST_REVISIONS', false);

Alternatively, if you only want to limit the number of revisions saved, add:

define( 'WP_POST_REVISIONS', X);

Replace X with the number of revisions you want to keep.

Discussion
[  0 Comments  ]

Leave a Comment

To add code, use the buttons below. For instance, click the PHP button to insert PHP code within the shortcode. If you notice any typos, please let us know!