WordPress.org

Ready to get started?Download WordPress

Forums

Disable annoying auto save? (5 posts)

  1. scruffy1
    Member
    Posted 1 year ago #

    Hi

    how can I disable the autosave feature, it is annoying and is not compatible with woocommerce as when it autosaves you are not able to alter product SKU, also during image upload the autosave feature kicks in and stops upload of image

    thanks

  2. Pioneer Valley Web Design
    Member
    Posted 1 year ago #

    Add to wp-config.php

    define('AUTOSAVE_INTERVAL', 160 ); // seconds

    Edit this to the seconds desired

    http://codex.wordpress.org/Editing_wp-config.php#Modify_AutoSave_Interval

    Or add to functions.php preferably in a Child Theme so the edit is not lost on theme update:

    function disableAutoSave(){
        wp_deregister_script('autosave');
    }
    add_action( 'wp_print_scripts', 'disableAutoSave' );

    Source: http://www.wprecipes.com/wordpress-hook-disable-posts-auto-saving

  3. scruffy1
    Member
    Posted 1 year ago #

    thanks

    used

    define('AUTOSAVE_INTERVAL', 160 ); // seconds

    but I think it should be

    define('AUTOSAVE_INTERVAL', '160' ); // seconds

  4. Pioneer Valley Web Design
    Member
    Posted 1 year ago #

    I provided the codex article on this - your theme can override - try with a function.

  5. scruffy1
    Member
    Posted 1 year ago #

    i mean the ' ' was missing in the codex, it seem to need to quote marks either side of the number of seconds

    thanks

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.