WordPress by default automatically saves a draft every 60 seconds (1 minute). There are reasons why you might want to change this. You could decrease it so as not to ever lose anything. But we prefer to increase it so that your browser doesn’t “hang” as much, and this also results in fewer writes to the database.
Change autosave interval
Follows the steps below to change the autosave interval on your site.
Click into the Perfmatters plugin settings.
Under the “Options” tab and “General” sub-navigation menu, choose an option under “Autosave Interval.” There are five different built-in autosave intervals you can choose from:
- 1 minute (default)
- 2 minutes
- 3 minutes
- 4 minutes
- 5 minutes
We recommend 5 minutes, and that is what we use on all of our sites.
Scroll down and click “Save Changes.”
If you get a warning saying that AUTOSAVE_INTERVAL is already enabled somewhere else on your site, that is most likely due to one of the following reasons:
- You are already using this feature in another plugin, such as WP Rocket. You only need to enable the feature in one or the other, but not both.
- You have the following code already defined in your
wp-config.phpfile. If so, you need to remove it.
define('AUTOSAVE_INTERVAL', 300); // seconds
If you want to keep your settings in another plugin, or your
wp-config.php file, simply change the Perfmatter’s setting back to default to fix the warning.