Post revisions is a great feature which shows the automatically saved or manually saved post revisions. You could revert any changes made in anytime if the post revisions are available. This is a great feature for many of the WordPress users. But, someone may find that, as a bad thing. If you have a limited amount of database storage or you no longer need the autosave feature, this article on ‘how to disable post revisions in WordPress to reduce database size’ might help you.
How to Disable Post Revisions in WordPress to Reduce Database Size
To disable post revisions in WordPress to reduce database size, follow the steps given below.
- Login to your web disk (Hosting account)
- Go to the WordPress Root directory.
- Open wp-config.php located in the WordPress root directory.
- Add the following code to the file and save the changes.
define('AUTOSAVE_INTERVAL', 300 ); // seconds
define('WP_POST_REVISIONS', false );
This will change the default 1-minute autosave to the 5-minute autosave. This helps you reduce the database consumption to a great extent. If you realize that you don’t need the past revisions of your WordPress posts, you can open the PHPMyAdmin and run the following SQL query.
DELETE FROM wp_posts WHERE post_type = "revision";
This will clear all previously saved post revisions stored in your database.
This tutorial is only for educational purpose. We do not recommend deleting the post revisions or disabling it. It is a good feature of the WordPress which help you stay updated without your content. Even if you had forgotten to save the changes, the WordPress will automatically do it for you. So, do it in your own risk.