How to disable post revisions on a WordPress site
WordPress provides revision control on any pages or posts that you create which allow you to go back and see previous edits that you’ve written over in the database. While this can seem like a great thing to have, over time it can lead to a lot of unnecessary overhead in your WordPress database.
Disable WordPress post revisions
Adding below code to your wp-config.php will disable post revisions.
<?php define('WP_POST_REVISIONS', false); ?> |
Limit WordPress post revisions
There is also an option to limit WordPress revisions without disabling it. Below code will only add 3 revisions to WordPress database,
<?php define('WP_POST_REVISIONS', 3); ?> |