WordPress editor autosave performance

Control your WordPress autosave interval

Autosave Interval lets you change how often the block and classic editor silently save a draft, replacing WordPress's fixed 60-second default with a value you choose.

  • Overrides WordPress's fixed 60-second autosave timer.
  • Applies to both the block editor and the classic editor.
  • Leaves an existing AUTOSAVE_INTERVAL constant untouched.
  • Trades draft-loss risk against fewer database writes.
WordPress Editor SettingsAutosave Interval
Autosave IntervalChanges how often the editor saves a draft automatically.
Interval (seconds)Leave empty to use the WordPress default (60 sec).
120seconds
Autosave every 120 secondsApplied to the block and classic editor.
Active
Quick answer

What does the autosave interval setting do?

When the autosave_interval module is active, TOWP_Performance::set_autosave_interval() reads the saved autosave_interval_value option and, if it is at least 1, defines the AUTOSAVE_INTERVAL PHP constant before WordPress's own wp_functionality_constants() runs. That constant is what WordPress passes to the editor JavaScript for both the block editor and the classic editor. If AUTOSAVE_INTERVAL is already defined by wp-config.php or another plugin, the module leaves it alone rather than trying to redefine it.

The fixed 60-second autosave problem

WordPress editors autosave every 60 seconds by default

Autosave protects unsaved work, but its fixed interval is a database write that runs on a timer nobody can change from the WordPress UI.

Every autosave is a database write

The block and classic editors save a draft automatically every 60 seconds, and each save is a request that writes to the wp_posts table, regardless of how much has actually changed.

The interval isn't adjustable from the UI

Changing it normally means defining the AUTOSAVE_INTERVAL constant in wp-config.php, which requires file access and is easy to overlook on a multi-editor or resource-constrained site.

A dedicated WordPress solution

Set the autosave interval from wp-admin

The module defines the AUTOSAVE_INTERVAL constant early enough in the WordPress bootstrap for it to reach both editors, without editing wp-config.php.

Earlier constant definition

The value is defined before wp_functionality_constants() runs, the same load-order point WordPress itself uses to set the default.

Covers both editors

WordPress localizes AUTOSAVE_INTERVAL into the editor JavaScript for the block editor and the classic editor alike, so one setting affects both.

Respects existing definitions

If AUTOSAVE_INTERVAL is already defined by wp-config.php or another plugin, the module leaves it untouched instead of risking a redefinition error.

Verified feature set

A precise, single-purpose performance setting

Every capability below is present in the supplied PHP class, settings renderer and settings registration.

Validation

Minimum-value guard

A submitted value below 1 is treated as not set, so the module never defines an invalid or zero interval.

absintMinimum 1
Conflict avoidance

Existing-constant check

defined('AUTOSAVE_INTERVAL') is checked first; if true, the module exits without attempting to redefine a PHP constant.

defined()No fatal error
Coverage

Block and classic editor

WordPress reads the same constant for both editing experiences, so no separate configuration is needed per editor.

GutenbergClassic editor
Independence

Isolated toggle

The setting is gated by its own module toggle, separate from Heartbeat, Post Revisions and the other performance tweaks in the same tab.

Own toggleNo side effects
Default preserved

Empty means default

Leaving the field empty keeps WordPress's own 60-second interval rather than forcing a specific value.

60 sec defaultOptional override
Practical use cases

Where adjusting the interval helps most

The module supports sites that need to weigh autosave frequency against database load or writing workflow.

Multi-author newsrooms

Lengthen the interval on sites where several writers edit simultaneously, reducing concurrent autosave requests during peak editing hours.

Resource-constrained hosting

Reduce write frequency on shared or budget hosting where every database write competes for limited resources.

Long-form content editors

Extend the interval for writers working on long documents where a 60-second save cycle interrupts flow more than it protects work.

Operational benefits

Turn a fixed timer into a deliberate trade-off

The module makes the write-frequency versus draft-safety balance a setting instead of a hardcoded WordPress default.

Fewer database writesA longer interval directly reduces how many autosave requests hit the database over a writing session.
One setting, both editorsA single number applies to the block editor and the classic editor without separate configuration.
No file access neededThe constant is set through the plugin's own settings screen instead of editing wp-config.php.
A visible trade-offThe setting makes explicit the trade between fewer writes and how much unsaved work a browser crash could cost.
Performance behaviour

Fewer writes, no added overhead

The verified implementation adds a single early constant definition and nothing else.

Fewer writes per session

Each skipped autosave is one less write to the wp_posts table, most noticeable on sites with several concurrent editors.

Defined once per request

The constant is defined a single time during the WordPress bootstrap, adding no ongoing runtime overhead.

Independent of other tweaks

The autosave override runs regardless of whether Heartbeat control, revision limits or block-asset removal are also enabled.

Security implementation

Validated input, no redefinition risk

The code includes integer validation, a minimum-value guard and a check against redefining an existing constant.

01

Administrator-only setting

The value is stored in the plugin's general options array, saved through the same settings form gated by the manage_options capability required to reach TheOneWP settings.

02

Integer validation

The submitted value passes through absint() before use, so it can only ever be a non-negative whole number.

03

Minimum-value enforcement

Any value below 1 is treated as not configured, preventing a zero or negative interval from ever reaching define().

04

No redefinition attempts

The module checks defined('AUTOSAVE_INTERVAL') before calling define(), avoiding a PHP fatal error if the constant already exists.

Verified compatibility

Built around WordPress's own bootstrap timing

The supplied code integrates through APIs present in WordPress core. No compatibility claim beyond the verified implementation is assumed.

Bootstrap timing

Before wp_functionality_constants()

The constant is set at the same load-order point WordPress itself uses, around line ~595 of wp-settings.php.

wp-settings.phpEarly bootstrap
Editors

Block and classic editor

Both editing experiences read the same AUTOSAVE_INTERVAL value localized into their JavaScript.

GutenbergTinyMCE
Conflict handling

wp-config.php precedence

A constant already defined in wp-config.php or by another plugin takes precedence; the module does not attempt to override it.

wp-config.phpNo override
Solution comparison

TheOneWP versus common alternatives

Compare the verified Autosave Interval implementation with typical combinations of wp-config.php edits or single-purpose plugins.

CapabilityTheOneWP Autosave IntervalOther common solutions
Changing the interval One number field in wp-admin, applied on saveUsually requires editing wp-config.php via FTP or a hosting file manager
Editor coverage Same value applied to block and classic editorMay require separate constants or filters per editor
Conflict handling Detects an existing AUTOSAVE_INTERVAL and leaves it untouchedManually defining the constant twice can cause a PHP fatal error
Validation Value sanitized with absint() and a minimum of 1 secondManual wp-config.php edits are not validated
Administration One toggle inside the TheOneWP System settings tabMay require a dedicated single-purpose plugin or a code snippet
Recommended workflow

Set your autosave interval in four steps

Choose a value that fits how your editors actually work, then confirm it in the editor itself.

01

Enable Autosave Interval

Activate the module from the TheOneWP System settings tab, alongside Heartbeat and Post Revisions.

02

Choose a value in seconds

Enter an interval of at least 1 second, or leave it empty to keep WordPress's 60-second default.

03

Save the settings

Saving writes the value to the plugin's options; it takes effect on the next page load since the constant is defined during bootstrap.

04

Confirm in the editor

Open the block or classic editor and check that automatic saves now follow the new interval.

Best practices

Choose an interval that fits how you write

The right value depends on how much unsaved work a crash could cost, not a single recommended number.

01

Balance interval against draft-loss risk

A longer interval means fewer writes but a larger window of unsaved work if the browser or tab closes unexpectedly.

02

Check for an existing constant first

If AUTOSAVE_INTERVAL is already defined in wp-config.php, this setting will have no effect until that definition is removed.

03

Consider it alongside Heartbeat

Heartbeat also affects autosave coordination; review both settings together rather than in isolation.

04

Test with real editors

Verify the new interval with the people who actually write on the site, since the right value depends on their workflow, not a fixed rule.

Common mistakes

Avoid assumptions that undermine the setting

The module has a defined scope and depends on what else defines the same PHP constant.

Assuming the setting always applies

A constant already defined elsewhere in wp-config.php or by another plugin silently takes precedence over this setting.

Setting an interval that's too long

An interval stretched too far increases how much unsaved editing work a crash or accidental tab close could lose.

Expecting it to affect Heartbeat too

Autosave Interval only changes the AUTOSAVE_INTERVAL constant; Heartbeat frequency and Heartbeat control are separate settings.

Frequently asked questions

Autosave Interval FAQ

These answers are derived from the verified class, settings renderer and settings registration.

What does the autosave interval setting do?

It overrides WordPress's default 60-second autosave timer by defining the AUTOSAVE_INTERVAL constant, applied to both the block editor and the classic editor.

What is the WordPress default autosave interval?

60 seconds. Leaving the field empty keeps this default rather than forcing a specific value.

Can I set the autosave interval below 1 second?

No. The submitted value passes through absint() and any value below 1 is treated as not configured, so WordPress keeps its default.

Does this setting affect the classic editor too?

Yes. WordPress localizes the AUTOSAVE_INTERVAL constant into the editor JavaScript for both the block editor and the classic editor.

What happens if AUTOSAVE_INTERVAL is already defined in wp-config.php?

The module checks defined('AUTOSAVE_INTERVAL') first and leaves the constant untouched if it already exists, avoiding a PHP fatal error.

Does a longer autosave interval risk losing my work?

A longer interval reduces database writes but widens the window of unsaved changes if a browser crash or accidental close happens between saves.

Is this setting related to the Heartbeat module?

They are separate settings. Autosave Interval changes the AUTOSAVE_INTERVAL constant; Heartbeat controls a different polling script used for post locking and session checks.

Who can change the autosave interval?

The setting is saved through the TheOneWP settings form, which requires the manage_options capability to access.

When does a new autosave interval take effect?

On the next page load after saving, since the constant is defined during the WordPress bootstrap, before the editor scripts are localized.

Can I disable autosave entirely with this setting?

No. The module only changes how often autosave runs; it does not provide a way to disable the autosave feature itself.

Stop writing to the database every 60 seconds.Set an autosave interval that fits your team.

Use Autosave Interval to apply one validated value to both the block and classic editor, without editing wp-config.php.