Forums

Turning off the auto save (36 posts)

  1. Farms2
    Member
    Posted 1 year ago #

    Could it be the wpLicense plugin, I've turned that off and things seem to be working.

  2. mydavisfamily
    Member
    Posted 11 months ago #

    I added the following, as suggested above, to my functions.php file in the theme, and it doesn't seem to have any effect. It is still autosaving..

    <?php
    function adjust_autosave($seconds) {
    return "999999";
    }
    add_filter('autosave_interval','adjust_autosave');
    ?>

    Anyone know if this is really supposed to work?

  3. willyrs
    Member
    Posted 8 months ago #

    I tried adding that code at the very end of functions.php (after the last ?>)....is that the correct spot? It seemed to break the whole site.

    I also tried deleting lines in post.php and post-new.php-- that did not disable autosave.

    I really, really need to turn off autosave. It's causing tons of problems by saving multiple versions of posts and interfering with the custom fields function.

    Version 2.3

    Thanks

  4. Otto42
    Moderator
    Posted 8 months ago #

    Yes, that code does work. I've just tested it again and it sets the autosave interval to a really high number (999999). Works perfectly.

    If you're adding it to an existing functions.php file, then leave off the <?php and ?> bits, and add it inside the existing php bits.

  5. night2008
    Member
    Posted 7 months ago #

    Hi,

    I've tried the numerous suggestions, but all had no effect.

    I think i might have found the only way to turn off the autosaving script, by stopping it from getting loaded by wp-includes/script-loader.php

    This will return Javascript errors, but I'm on it ;)

    When I have more info, I'll surely post it here.

  6. mydavisfamily
    Member
    Posted 6 months ago #

    Hello night2008.
    I had the same issue with these suggestions to set the interval at a high number. They just didn't work for me. I personally think it might be something to do with the version I was running (v.2.1.2). My particular problem had to do with autosave kicking in before I could publish a new post and the notify email would not go out. If I could type in the post and click publish before autosave, the email went out fine.
    I finally patched core program post_new.php to disable autosave for a "new" post and the problem went away. Don't know if this will help you or not. My patch for v.2.1.2 follows. Newer versions might be around the same location?

    1. Commented out Line #7 of post_new.php WP v2.1.2
    and replaced with the following:

    // Autosave disabled Aug 5, 2007 by MLD
    /*
    wp_enqueue_script('autosave');
    */

Topic Closed

This topic has been closed to new replies.

About this Topic