How to Disable Post Revisions in WordPress and Reduce Database Size

Post revisions is a great built-in feature in WordPress. But soon it could increase the overall database size and affect your website’s performance.

The post revisions are a full copy of a Post. So if you update the post/page 50 times, then WordPress will store 50 copies of same post/page in the database.

So if you’re concerned about performance you can either disable the “post revision” feature or limit the number of revision WordPress stores in the database.

Open wp-config.php located in your WordPress root directory and add the following code:

define('AUTOSAVE_INTERVAL', 600 ); // seconds
define('WP_POST_REVISIONS', false );

Alternatively, if you want to limit the number of revisions of a post, you can use a number like shown below:

define('WP_POST_REVISIONS', 10);

Post revision is an excellent feature. But if you face issues due to database size, then you should consider disabling post revisions or at least limiting it.

Credits

Leave a Comment