How to Manage AUTOSAVE_INTERVAL in WordPress

Nur . Posted in How-To 606 Views

WordPress by using Ajax has a feature auto-save revisions, when you edit the blog post or page, it automatically saves a copy of the post with recent changes each 60 seconds by default. You may want to increase this setting for longer delays in between auto-saves, or decrease the setting to make sure you never lose changes.

I’ve been reading a lot about how the autosave is such a pain when writing and editing, It autosaves every 3 seconds and jumps up to the top of the page I have to scroll back down to look for where I left off, this is a very annoying waste of time. Even I’ve tried the plugin WP-CMS Post Control and Disable autosave Plugin – doesn’t work.

Autosaves are activated for all the WordPress blog posts and pages. I recommend not to disable autosave feature because it is extremely beneficial in case when you are in between editing a post and write so many crucial lines and finally discover that either your browser has crashed while typing or you have lost internet connection after pressing ‘Publish’ button. and now you have lost all the changes, a big loss of time and efforts! If you have Autosave enabled in such situation, then next time you come to edit the same post, you would get the message at the top that

There is an autosave of this post that is more recent than the version below. View the autosave.

which would have the link to autosaved revision of the post and an option to restore the original post from the autosave copy.

How to Increase WordPress Autosave Interval?

Go to your wp-config.php

Note: Do take backup of the file “wp-config.php”.

Find the following comment line.

/* That's all, stop editing! Happy blogging. */

Just before the above comment, put the below code

define('AUTOSAVE_INTERVAL', 250 );  // seconds (default is 60)
define('WP_POST_REVISIONS', false ); // disable post revisions
define('WP_POST_REVISIONS', 3); // alter number of post revisions kept.

Remember that the constant ‘AUTOSAVE_INTERVAL’ represents the delay between the two autosaves in seconds. Replace the value (250 seconds above) as per your requirement.

Post your comments in case you have some interesting findings or issues on WordPress autosave feature.

References and Other Resources:

How to Specify Autosave Interval in WordPress
Daily Tip: Customize WordPress Autosave Interval and Post Revisions in WP-Config
The Power of wp-config
Adjust or Increase WordPress Autosave Interval For Blog Posts And Pages
How to Change the Frequency or Interval WordPress Auto Saves An Editing Post or Page
wordpress.org-Editing_wp-config
How To Adjust Your Autosave Timings
Cut down your exam stress by using our latest and high quality mcse 2008 dumps and 156-915.70 demos. We provide updated 642-185 dumps questions with 100% pass guarantee.

Nur

I am a Wordpress, Website Developer and Designer, creator @ WP Arena, Provide Free WordPress consultation and can help to install WordPress in a secure way to small businesses and bloggers.
  • Pingback: Must Read Links for Web Designers and Developers – Volume 4 | Tech King

  • Anonymous

    Hey guys, Im having a problem with this feature, wp tries to autosave but fails and displays a message saying Im not authorized. Any ideas?

  • http://wparena.com/ Wordpress Arena

    First of all Check with your host and ask if they’ve recently installed or modified mod_security.

    2nd Option, It’s about the theme, so change with default theme and hope this will work.

    3rd. Option: Check the value of the wp_user_roles option, if you can load it via PhpMyAdmin, You can paste the contents of it here if you want (Options table, then look through for it)

Free & Professional WordPress Security Service Free & Professional WordPress Security Service

We Love WordPress. WordPress Arena is a place for WordPress Developers and Designers, providing Tips, tricks, tools and resources to build a website or blog on WordPress. We also present The WordPress Showcase for all kind of WordPress Powered Websites.


Copyright © 2014 WP Arena All Rights Reserved

Divi WordPress Theme