Every time when we create a new post, WordPress provide a facility to auto save the post. WordPress saves a different version of page or post for each edit you make. It saves minimal edit into the database which increases the size of the database. It is a great feature, but not the best option for users who have limited database space.

disable post revision wordpress

How to Disable Post Revisions in WordPress

By default, post revisions are enabled In WordPress. But we can disable the post revision and increases the autosave interval time by adding these two lines to your wp-config.php file. Login to your Cpanel and go to wp-config.php to your WordPress root directory.

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

The first code increases the autosave interval from the default 60 seconds to 300 seconds. the second code will disable the Post revision. But it will not delete previous revision saved in your database.

How to delete revision saved in WordPress Database:

To delete previous revision saved in your database, Login to PHPMyAdmin, Select yours database and run the following SQL query.

DELETE FROM wp_posts WHERE post_type = "revision";

It will delete all saved post revisions stored in your Database.

Delete Revision by Plugin

You may also delete saved revisions, auto saves and other junk data from database by using the WP Sweep Plugin. This plugin uses native WordPress function to remove junks from database.

 

Pin It on Pinterest

Shares
Share This