Your prompt

Take a backup of my site, then add this to wp-config.php above the line that says “That’s all, stop editing!”: define( 'AUTOSAVE_INTERVAL', 120 );  Confirm the site still loads afterwards.

What this prompt does

This prompt asks your AI assistant to add AUTOSAVE_INTERVAL set to 120 to wp-config.php. While you write, WordPress saves your work in the background every so often, by default every 60 seconds. This line stretches the interval to 120 seconds.

Fewer autosaves mean fewer background requests to the server, which can help on weak hosting or when many editors work at once. The cost is that if your browser crashes, you could lose up to a couple of minutes of typing instead of one.

The constant is measured in seconds.

Autosave is separate from the revisions that are created when you press Save Draft or Update. Changing the interval affects the background saves that happen while you type, and your manual saves work exactly as before. If your team writes long articles, ask them before you slow it down. It is a modest tuning change, not a fix for a broken site, so do not expect dramatic results.

Before you run it

It is a small change in a sensitive file.

  • Take a backup, as instructed, and know how to reach the files if the site stops loading.
  • Consider whether your writers would rather have the safety of frequent saves.
  • Ask the assistant to show you the edit before saving.
  • Check that the constant is not already defined.

Make sure it goes above the stop-editing comment, like the other settings in this set.

What to check afterwards

  • The site and admin load without errors.
  • The line is correct, with the number unquoted and a semicolon at the end.
  • It appears once only.
  • Edit a draft and watch that autosaves happen at about the new interval.
  • Editing feels the same and nothing else was changed.

Ways to adapt it

  • Different value: Set it to 300 seconds, as my posts are short.
  • Go back: Set it to 60 so I have the default behaviour again.
  • Audit the file: Show me every constant in wp-config.php and explain what each one does.

If it goes wrong

  • You lost writing after a crash. Use a shorter interval, or write long pieces in a separate document.
  • A white screen. Restore the previous wp-config.php from backup.
  • No effect. Check for a duplicate definition or a plugin that overrides it.

For wider speed work, see fixing a slow WordPress admin and the speed optimization guide.

← Every prompt on WPMusk

SponsoredNibWP

Stop clicking. Start telling.

Ask your AI to build pages, fix speed and nail SEO, and NibWP does it on your WordPress site in minutes.

Try NibWP.com

Get the WPMusk Sunday brief

One email a week with our newest tutorials, honest tool reviews and resources you won’t find on the blog. No spam, unsubscribe in one click.

Newsletter (Sunday brief)