Disable / turn off post revisions in WordPress

ADVERTISEMENT

Yesterday, I shared a single-line MySQL command to delete all post revisions from a WordPress database. While this might help to delete past revisions, it would be easier if we could disable post revisions completely.

Turning off post revisions, the WordPress “feature”, is as easy as adding the line below to your wp-config.php file (found in the same folder as wp-content and wp-admin folders). Do not forget to backup your MySQL database before adding the code (although technically, this isn’t a DB command, it is better to be safe than….)

ADVERTISEMENT

define(’WP_POST_REVISIONS’, false);

To get our latest articles, click here to sign up for our free email newsletter or subscribe to RSS feed

§ Leave a Reply