Performance PHP Beginner

Change How Often the Editor Autosaves

Make the post editor autosave every 2 minutes instead of every minute, to cut down on requests and revisions.

Tested on WordPress 7.1 PHP 8.3 No plugin needed Updated
wp-config.php 1 lines
define( 'AUTOSAVE_INTERVAL', 120 ); // Seconds.

Where to add this

Recommended wp-config.php Above the line that says "That's all, stop editing!" in your wp-config.php file.

While you write, the editor autosaves your work every 60 seconds. On slow hosting with several people writing at once, that’s a steady stream of requests. A longer interval reduces them, at the cost of a slightly older autosave if something goes wrong.

How it works

AUTOSAVE_INTERVAL sets the time between autosaves in seconds. It affects both the block editor and the classic editor. The browser also keeps a local backup of your post, so a longer interval rarely loses work.

Things to watch

  • Each post has only one autosave per user, so this doesn’t add revisions; it just changes how often that autosave is updated.
  • Very long intervals, over 5 minutes, increase the risk of losing work if the browser crashes.

How to test it

Check Tools → Site Health → Info → WordPress Constants for AUTOSAVE_INTERVAL.

This website uses cookies to enhance your browsing experience and ensure the site functions properly. By continuing to use this site, you acknowledge and accept our use of cookies.

Accept All Accept Required Only