WordPress disable posts/pages auto save and revision – full complete guide

When you editing your posts/pages in WordPress posts/pages are automatically saved by WordPress function.When you editing big post if your contents lose because some reason,so then this function is very useful.But in some situations, for a example you editing on your post if this happens, the window automatically scrolls to the top and you lose the place where you are editing.

The “Revision” means in the database,keep the auto saved post of the current editing post/page.Then you can replaced each auto saved contents to the current post/page.

So now,I’m going to explain how to disable or completely remove this process.


1-First go to the file editor and open the following files in these locations.
wp-admin/post.php (Line 176)
wp-admin/post-new.php (Line 36)

2-Now find this code.

Remove this or comment it like this.

3-Save and close both files.That’s all.


1-Open the wp-includes/function.php file.
2-Add the following wordpress hook function at the bottom.

3-Save and close the file.That’s all.

How to disable “Revision”

Revision can be view like this.

1-Simply open the wp-config.php file and add the following script like this.

After adding like this.

If you want to keep limited files as revision, it can be done like this by editing wp-config.php file.

Note:Sometime this if you did like this,revisions may be generated.So then you can execute the following mysql query in the database or use this plugin(WordPress Revision Control).


How to delete these revisions?

You can use simple delete query like this.

But that removes the actual revisions (the saved copies of your posts), but doesn’t clean up after any of the associated data that is stored in the wp_term_relationships and wp_postmeta tables. The first delete query provided in the article deletes all revision-related data, as well as the revisions themselves.

Published by

Sumith Harshan

Sumith Harshan is the Web Engineer Specializes in Java Script, JQuery, HTML4/5, CSS2/3, PHP, CodeIgniter, CakePHP, J2SE, J2EE, XML, Hacking & Security, Mobile Interface Developing, Magento, Wordpress, Joomla, Drupal,PHPBB,Facebook App Developing and Open cart...etc.