Select Page

It’s important to keep post revisions under control or they will quickly fill up your database. If you’re looking to limit the number of post revisions in WordPress, there are a few methods you can use. The easiest one is to simply edit your wp-config.php file and add a line of code that defines how many revisions to keep.

To limit the number of post revisions, you only need to make a small change in your wp-config.php file.

To limit the number of post revisions in WordPress, simply add the following line to your wp-config.php file:

define('WP_POST_REVISIONS', 5);

The number you choose will become the limit for revisions per post. In this case, it will be 5.

Before you add this line of code, search for WP_POST_REVISIONS in your wp-config.php file, and if you find it, just change the true or false value to the number of revisions you want.