Change auto-save frequency when editing Wordpress posts

Posted on August 20, 2008 at 5:19 am

If you are one of the millions of people who use Wordpress, you may have noticed that when you are editing a post, Wordpress will auto-save the changes every once in a while to ensure that you do not lose your modifications because of an accident.

The default interval for auto-saving an edited or unsaved post is 60 seconds. The feature was introduced in Wordpress 2.1 and has been around ever since. It’s kind of like the MS Word auto-save feature, which I might add, has saved my life numerous times!

If you want to change the auto-save frequency for whatever reason to something lower or higher, you can do so by editing the WP-CONFIG.PHP file that is stored in the root of your Wordpress directory.

All you have to do is add a constant called AUTOSAVE_INTERVAL to set a new value for the duration.

Here is the line that you would need to add to the config file:

define(’AUTOSAVE_INTERVAL’, 180);

In the above case, I am setting the auto-save duration to 3 minutes. Note that you should put the value in seconds. Now Wordpress will auto-save a post or a page every 180 seconds.

You should add the line at the bottom of the section where all of the define statements are located. Usually, it’s the first section and starts with define(‘DB_NAME’, ‘yourdatabasename’);, etc.

auto save interval wordpress

That’s it! I found this useful for my own site because depending on what plugins you have installed in Wordpress and your hosting server, an auto-save can take anywhere from a second to 10 seconds or more! If it takes a long time to save posts, it might be a good idea to increase the auto-save interval. Enjoy!

Enjoyed this post? Subscribe to Online Tech Tips via RSS Feed or via Email and receive free daily productivity tips.

» Filed Under WordPress

Add to Delicious Save this page Mixx it Stir it up on Mixx
Reddit Add to Reddit StumbleUpon Stumble this page  

Related Posts

3 Responses to “Change auto-save frequency when editing Wordpress posts”

  1. Madhur Kapoor said on :

    Nice tip buddy .


  2. Sumesh said on :

    Good tip. And I think it’d survive WP upgrades. :)


  3. usws said on :

    I’m more afraid of the strain it’ll put on the host. They might shut down my site all of a sudden for using too much bandwidth/CPU. UGH! A pretty good feature nonetheless.

    Oh, and thanks for the heads up!


Please post your comments/suggestions!