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:

50 Comments

  1. hari says:

    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

  2. Lateefx says:

    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

  3. Roland says:

    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.

  4. brian says:

    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.

  5. [...] out to Untwisted Vortex for the information. What do you [...]

  6. Ariel says:

    Thank you very much!! Autosave has been causing issues for me and being able to disable it altogether is a big help.

  7. [...] Adjust WordPress Autosave or Disable It Completely [...]

  8. [...] ???????? ??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 [...]

  9. 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

  10. Will says:

    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?

  11. 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

  12. Andy from Acupuncture Points says:

    I've always kinda found the autosave annoying…never knew there was a way to disable it. Glad to get the tips here!

  13. Nick from no win no fee claims says:

    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

  14. DStudiobali says:

    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

  15. 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. :-)

  16. Geoserv says:

    Why is it that something so annoying is lived with for so long, only to have the solution be so simple.

    Thanks for posting.

  17. will says:

    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

  18. Jumpin from Personal Trainers says:

    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.

  19. Jules Manson says:

    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.

  20. [...] Adjust WordPress Autosave or Disable It Completely [...]

  21. Navigon says:

    What a horrible feature that autosave…this plugin fixed it all up.

  22. andy from Free Credit Report says:

    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.

  23. Jeff from Albany car insurance says:

    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

  24. Tim from Video Game Tester Jobs says:

    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?

  25. Thank you so much for this. AdBlockPlus was showing lots of stuff getting loaded every second

  26. 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

  27. Instead of disabling autosave, i chose to disable wordpress completely!

    I'm very not pleased with what they offer.

    Blogger on the other hand…

  28. adam from adult vacations says:

    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?

  29. autosave sometimes is needed, but i prefer not to use it anymore.

  30. dana says:

    it works fine!! my wp databases say "thank you" ;-)

  31. Kahuna says:

    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

  32. 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

  33. chiery from addicting games says:


    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.

    That is exactly why I sometimes hate autosaving^^ Thank you so much for this post, I never knew that it can be disabled completely,,

Leave a Reply

CommentLuv Enabled

This site uses KeywordLuv. Enter YourName@YourKeywords in the Name field to take advantage.

Anti-Spam Protection by WP-SpamFree