Disable WordPress AutoSave and Revisions
Since version 2.6, WordPress has added many great features .Along with the advantages, it’s accompanied by 2 features that many bloggers do not satisfy: Autosave and Revisions.
Revisions simply save the posts many times: WP will add a new row in the DB every time an user changes a post; this could be good when the blog is maintained by different editors, because they can track the various versions/revisions of every post, but it’s actually totally resources wasting to all the single editors ones.
AutoSave now create a second copy of the post that is stored and used to keep the post up-to-date when a subsequent AutoSave is executed on the same one. This is quite annoying too. I never liked much the AutoSave and the new implementation is even worse to me.
So what is the solution to solve the problem?
1. Stop the Revisions scheme
To turn off Revisions, edit the wp-config.php file and adding following code after the DB settings lines:
define(‘WP_POST_REVISIONS’, false);
You can also delete all post revisions by running this query in phpMyAdmin. Be sure to backup your database first before performing any queries in phpMyAdmin.
DELETE FROM wp_posts WHERE post_type = ‘revision’;
2. Stop the AutoSave
Some users said that AutoSave doesn’t create a revision but some others have report that one revision is created by AutoSave too; it’s actually not clear if this is a behavior resulting from a WP’s bug/problem or a particular provider’s systems configuration.
It’s simple to solve the problem by a plugin.
<?php/*
Plugin Name: Disable Autosave
*/
function disable_autosave() {
wp_deregister_script('autosave');
}
add_action( 'wp_print_scripts', 'disable_autosave' );
?>
Just copy above code and paste it in to a blank document and save it as disable-autosave.php. Then upload it to WordPress plugins directory on your web host and active it. I will automatically disable the Autosave function of WordPress.
But using a plugin is far faster and much easier
You can Active or Deactive it whenever you like without modifying any code in your WordPress. These following plugins were created by Exper Giovanni Rubaltelli.
disable-autosave.zip – Disable Autosave function
disable-revisions.zip – Disable Revisions function
disable-revisions-and-autosave.zip – Disable Revisions and Autosave at the same time
Source: vinatips.com
Popularity: 2% [?]









