Adjust WordPress Autosave or Disable It Completely
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 Posts:



One of the reasons I stopping using WordPress is its crappy configurability from within the admin panel.
Autosave should actually be a configurable setting from the admin panel and not require PHP edits.
My latest blog post: Officially downgrading from Vista to XP
Yes, it makes you wonder why they keep adding features without fixing the ones that need to be fixed first.
BEAUTIFUL!!! THANKS FOR THIS….
What a horrible feature that autosave…this plugin fixed it all up.
Cheers
My latest blog post: Chrysler Jedi Mind Trick: “Let’s Refuel America” – $2.99 per Gallon Gasoline Guaranteed for Three Years
Thank you so much for this. AdBlockPlus was showing lots of stuff getting loaded every second with the auto-save on. The inability to insert links from the visual editor (the 'pop-up' stayed blank) is now also fixed.
Any idea why this doesn't work for me? I have the latest 2.5.1 installed, I have tried everything on every forum/blog etc. and it still autosaves every time i make a change, within a minute i'll have 3-4 drafts.
I don't know. If you're using the plugin part, make sure of several things. 1) You've cleared your browser cache, 2) You've actually activated the plugin, 3) If you're using WP-Cache or something like that, make sure you clear that cache too.
Other than those things, I can't say. It's working on all of my blogs.
and your using 2.5.1?
I have installed wp like 5 times, tried different browsers, everything.
WTF!!
Something is definitely wrong if it doesn't work. Yes, I'm using the latest 2.5.1.
Check your plugins. It could be something stupid like a JavaScript conflict since both the autosave and disabling it deal with the same script.
You shouldn't be getting more than one new draft every time you start to write. If you're getting multiple, there's more going on in the background. Try disabling plugins, one at a time, to see if it changes.
After playing with it forever I noticed it works fine, except when I start to add custom fields is when it starts autosaving (all of my posts contain custom fields). Any idea why this might happen?
The custom fields editor part is flaky, always has been. I need to take a look and see if autosave is invoked by it. It shouldn't be, but you never know.
I couldn't find any other place where it's invoked. Try adding the option to config.php and use 999999 as the time increment. If that works, all is well.
Yes it's very weird. Even with the delay, right when I start adding custom fields it starts doing the autosave. Up to that point its fine…
Okay, do you have another plugin running that does something with the custom fields? That may be the cause. I can't duplicate what you're telling me here.
the only plugins i have running are the autosave disable, wp post ratings and wp-contactform
[...] out to Untwisted Vortex for the information. What do you [...]
Thank you very much!! Autosave has been causing issues for me and being able to disable it altogether is a big help.
I recommend you pick up the plugin that disables this for you, because editing your config file is not something that's recommended.
My latest blog post: Learning about becoming a sheriff
I disagree. If you know how to work with php it's much easier to edit a config file rather than to look for a plugin and waste time on installation.
[...] Adjust WordPress Autosave or Disable It Completely [...]
[...] ???????? ??1????Disable Wordpress Autosave??2????Disable autosave ??3????How To Turn Off Post Revision In WordPress 2.6 ??2?4????Adjust WordPress Autosave or Disable It Completely [...]
For many task I have to edit wordpress files manually and I think there is nothing wrong with it(Of course if we can handle it fairly omitting all security flaws). Thanks for sharing the cod how know.
My latest blog post: Pousada Natalli – Cabo Frio / RJ – Brasil
I've updated a couple posts after upgrading to Wordpress 2.7 and I've just cheked my database. I found 2 new entries with the value "revision" in the field "post_type". I disabled it completely with the code you provided, but now it doesn't seem to work. Do you know why?
I don't know. I upgraded and it's still working for me. All I can advise is to double check your config.php as well as any plugins.
It seems it creates a "revision" entry in the database when you hit the "Preview" button on any post…
I see that there have been a couple of issues with WP 2.7 – anybody else have any problems? I'm thinking of installing this & would welcome any feedback on potential problems! Thanks in advance.
My latest blog post: Scratch Proof BlackBerry Storm Screen
This interests me too! I have similar problem so if any good soul could place here in comments possible feedback on potential problems I will be gratefull to you!
My latest blog post: Who is Matthew Balicic
I've always kinda found the autosave annoying…never knew there was a way to disable it. Glad to get the tips here!
Great tip – it is annoying when the auto save kicks in half way through a post so you have to go back and change the slug.
My latest blog post: Making a No Win No Fee Claim
RT, why we need to disable the auto save ? Yes, I have problem with this autosave, but I only need to make their autosave more longer, how to set the time ? Any idea ?
My latest blog post: Busby SEO Test
Great tip, RT!
I use Firefox and keep it at the bleeding edge so I can blog about new things. This means my browser crashes more often than normally and the AutoSave feature has saved my butt many a times. But, I do like the delay option in this plugin. I will give it a try and add it to my Top WordPress Plugins you have linked to. Thanks for the link.
Why is it that something so annoying is lived with for so long, only to have the solution be so simple.
Thanks for posting.
Thanks you are a hero!
I was confused at 1st why I kept finding mistakes in posts that I had already edited.
Autosave is a horribly implemented "feature"
My latest blog post: Col de la Croix Fry via Col de Plan Bois
I absolutely can't stand the autosaves and when the post gets stuck in draft. thanks for this awesome backend edit for wordpress.
I have disabled it already after reading a method somewhere else. I am wondering why they have such useless functionality in it? It always creates a lot of mess and undesired extra work.
For those of you complaining that the disable autosave hack doesn't work for you while using 2.5.x here is my answer to you…
UPGRADE FOR CRYING OUT LOUD!!!!!!!!!!!!!!
uneffenbelievable!
Sorry about that but it had to be said.
[...] Adjust WordPress Autosave or Disable It Completely [...]
What a horrible feature that autosave…this plugin fixed it all up.
Good reason for disabling it altogether. The darn slugs! =) Does this also prevent the saving and locking in of the permalink/url based on the title? I get annoyed when I retitle a post and then have to remember to edit the URL accordingly because it's already settled in for you automatically.
I'm not sure what it does with the slugs. I disable autosave and revisions on all my blogs and I don't have any problems with the slugs or titles. Your mileage may vary.
I don't totally hate the auto save feature but it can be annoying. I think I prefer the delay method over the remove method though, its saved me on a few occasions when writing some ultra long posts.
My latest blog post: Factors That Affect Albany Car Insurance Premiums
Thanks for this useful post. I will start using wordpress in the next couple of weeks, so this was very useful thanks.
My latest blog post: Video Game Tester Salary – How Much Will You Earn?
Thank you so much for this. AdBlockPlus was showing lots of stuff getting loaded every second
I don't totally hate the auto save feature but it can be annoying. I think I prefer the delay method over the remove method though.
My latest blog post: HTC Touch Pro Review – More Professional with QWERTY keyboard
Instead of disabling autosave, i chose to disable wordpress completely!
I'm very not pleased with what they offer.
Blogger on the other hand…
Hmm, I've used wordpress for quite sometime now and really don't see what's the big deal. the default save settings works just fine! but oh well, different strokes for different folks right?
autosave sometimes is needed, but i prefer not to use it anymore.
it works fine!! my wp databases say "thank you"
Hi,
I am having a problem related to word count in WP
paste in 6239 words (tried Michaels suggestion, even reformatted the whole doucument.
The word count in the editor reads 6239
Then I hit publish, it goes down to 1836 (or similar)
I might go in to the DB and see if I can manually adjust the character limit for the field.(tried that there is no conditionals in the DB)
But has anyone come across a solve?
Thanks
Kahuna
Those of you who aren't satisfied with it just upgrade. And personally, i don't think it's that all important.
Jack from buy to let repayment mortgage
That is exactly why I sometimes hate autosaving^^ Thank you so much for this post, I never knew that it can be disabled completely,,