Select Page

WordPress creates backups of your content in the form of post revisions. Post revisions help you get back to earlier versions of a post in case you make a mistake. Think of them as an undo button for your entire article.

Although post revisions can be helpful, they can start to add up and start taking up a lot of space in your database. If you want to disable them, place this line of code in your wp-config.php file:

define('WP_POST_REVISIONS', false);

Before you add this line of code to your wp-config.php file, search for WP_POST_REVISIONS in the file. You might find that this line of code already exists. And if the above line of code already exists, change true to false.

You can also limit the number of revisions that are created per post, by changing the true or false value of the above line to a number:

define( 'WP_POST_REVISIONS' , 10 );

The above line of code will limit post revisions per post to only 10.