How to disable auto save, post revision and reduce the database size in wordpress

The auto save option in wordpress is a best feature but not for every. For those who have limited web space, limited database size and they not want to auto save or post revision option they can disable this option by adding two lines in wp-config.php file

Add the following code in your wordpress config file i.e. wp-config.php

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

By this code the auto save function of wordpress will be disable and it also increase the speed of the site because the database less consume space

But the above code will not remove the past revisions from your database. You have to do this manual  with the help of phpmyadmin, please visit the phpmyadmin and run the given blow query. It will remove the all revision post from the wrdpress database.

DELETE FROM wp_posts WHERE post_type = “revision”;

Here wp_posts is the table name and the wp is the prefix of tables, which is defined at the installation time. You should use your prefix otherwise the error will shown “#1146 Table does not exist”.

Bansal Sumit

To seek challenging roles and to achieve excellence in the field of Open Source Web Technology with a profound spirit of commitment and dedication.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *