These are methods that disable or delay the WordPress autosave functions. The disabling plugin works with versions 2.3 through 2.7 (confirmed with 2.7) while the delay configuration works with 2.5 and later.
To Disable
Copy this text to a text file, name it whatever you want (using the .php extension, of course) and upload it to your WordPress plugin directory. Activate it and it works immediately, but you need to clear your browser cache:
<?php
/*
Plugin Name: Disable Autosave
*/
function disable_autosave() {
wp_deregister_script('autosave');
}
add_action( 'wp_print_scripts', 'disable_autosave' );
?>
If the copy-n-paste routine is too much work, I found a similar plugin all zipped up at http://samm.dreamhosters.com/wordpress/plugins/ after I wrote the above. The only real difference, that I can see, is the addition of "<!– disable-autosave.php plugin_deregister_autosave() –>" in the source.
To Delay
Hidden away in the "wp-settings.php" file for version 2.5.1 (I don't know if it was in 2.5), is this little snippet:
/**
* It is possible to define this in wp-config.php
* @since 2.5.0
*/
if ( !defined( 'AUTOSAVE_INTERVAL' ) )
define( 'AUTOSAVE_INTERVAL', 60 );
All you have to do is add define('AUTOSAVE_INTERVAL', 60) (changing to the 60 seconds to whatever amount of seconds you want) to your existing wp-config.php file below all the rest of the define settings at the top of the file.
My Choice
My choice is to disable it completely. I don't like the autosave function kicking in when I'm halfway through writing the post title because then I have to edit the slug as well.
Update 2008-12-17
I upraded two blogs to version 2.7 and created a new blog with 2.7. This method worked for all of them. I have reports that it doesn't work for some people, but I can't find a reason why. I have better things to do with my time right now than looking for an answer, like finding top wordpress plugins.
Similar Articles:
- Turn Off WordPress Post Revisions
- An Easy Way to Stop Automated Comment Spam
- Setting up NginX FastCGI Cache to work with WordPress
- A Conditional Comment Form in WordPress
- File Permissions and WordPress
This article is published as: Adjust WordPress Autosave or Disable It Completely
Thank you! This is a great solution. Why create a plugin and not just add to the wp-config.php in the theme?
.-= My last blog: Crab Bird – My 4 year old's idea =-.
The plugin part doesn't work in the wp-config.php file. Only changing the time parameter works there. I don't know why the WP folks just didn't make this an option in admin.
Hi there, you look like someone that has a clue about the autosave feature. I would like to call some javascript if the autosave was successfull. Do you know how I would Do this?
I would be very happy for help!
I'm sorry, I don't know enough about the underlying code to give you an answer. I'm sure it's doable, but I don't know how to do it.
ok, thanks for the quick answer, anyway!
.-= My last blog: wp_NonverBlasterHover =-.
Thank you for the quick fix. I cannot understand why the WP developers don't just include an on / off button on the Dashboard for this.
Peace,
Karl A. Krogmann
Window Replacement, Lake Geneva, WI recently posted..A Few Words From Jack Fagu, Spokesdog
absolutely great and simple solution instead edit the core. Thanks a lot for really simple solutions.
regards.
Jobingco
home design ideas recently posted..Chic Italian Bathtub Zucchetti’s Morphing Bathtub
I tried out the plugin on a site I am running in version 3.0.5 and I had a problem with it interfering with another plugin. I found a solution and I don't know if it works in all themes, but what I did was added your plugin code to the functions.php file in my theme and it all seems to be working fine.
Les Warren recently posted..Avoiding Spending More Than Necessary on a Web Site
awesome! thanks for sharing. this is exactly what i need
This post was easier and did my task – http://dkgadget.com/disable-autosave-posts-pages-wordpress/
And when that file gets changed with a WordPress upgrade, you get to do it again.
We use wordpress as our only platform for developing our websites and have asked my business partner to read this posting and adjust our sites accordingly. Thanks for taking the time and showing the actual code – helped a lot.
Ej@DIY Greenhouse recently posted..Greenhouse Glazing
Thank you for this tip. I have a plugin that I have just put in random bits of code in, instead of having multiple plugins for just little things. This worked perfectly.
Tosh recently posted..Ron V. Boswell uploaded a new avatar
I rather to have the Autosave function rather than lose the blog post work. You posted for the versions 2.3 to 2.7
Would it work the same code for wordpress version 3.1
Leon David recently posted..How to Lose Weight without Exercise – Four Proven Tactics
I'm still using it.