Maintenance Mode and Caching
When your site is in maintenance or coming-soon mode, you do not want the page cache to save that temporary screen and serve it to real visitors later. This module makes the cache aware of maintenance mode so that never happens.
What this does
While your site is in maintenance or coming-soon mode, xSpeed Cache stops writing new pages to the cache. This means the maintenance screen is never frozen into your real page cache.
When you switch maintenance mode off and the site goes live again, xSpeed Cache purges the cache once. The first real visit after that rebuilds a fresh copy, so no page that was cached during the maintenance window can be served.
The module reads the maintenance state from your site. It detects:
- WordPress core maintenance mode (WordPress 6.6 and newer).
- The legacy
.maintenancedrop file on older WordPress versions. - Common coming-soon and maintenance plugins: SeedProd, Elementor maintenance/coming-soon mode, and WP Maintenance Mode.
- A custom state declared through the
xspeed_is_maintenance_modefilter, for any other setup.
It only reads these states. It never turns maintenance mode on or off for you.
Note: WordPress core’s own maintenance mode short-circuits the request with a 503 before plugins load, so a standard core maintenance window already protects itself. This module is most useful for the plugin-based coming-soon modes listed above.
Why use it
- Visitors never get served a cached maintenance or coming-soon screen after the site is live.
- The cache is cleared automatically the moment you go live, so you do not have to remember to purge it by hand.
- It works with the maintenance tools you already use, without extra setup.
Requirements
- xSpeed Cache Pro active.
How to enable it
- Go to the xSpeed Cache dashboard in your WordPress admin.
- Open the Maintenance panel.
- Turn on Enable maintenance-aware caching.
- Save your settings.
The panel also shows whether your site is currently in maintenance mode, so you can confirm the state at a glance.
Settings explained
| Setting | What it does | Default |
|---|---|---|
| Enable maintenance-aware caching | While the site is in maintenance or coming-soon mode, xSpeed Cache does not cache pages, and it purges the cache when the site goes live so the first real render is fresh. | Off |
Enable maintenance-aware caching
Turns the whole feature on or off. When on, xSpeed Cache skips caching during maintenance and purges the cache once when the site returns to live. Default is off.
When off, the module does nothing and normal caching applies at all times.
Best practices
- Turn this on before you next put the site into maintenance or coming-soon mode.
- Leave it on permanently. It has no effect while the site is live, so there is no downside to keeping it enabled.
Troubleshooting
- The maintenance screen was still served after going live. Confirm Enable maintenance-aware caching is on. The purge on recovery only runs while the module is enabled.
- Cached pages are not being served at all. If you disabled the module while the site was in maintenance mode, xSpeed Cache clears the internal maintenance flag on the next loaded request so caching returns to normal. Load any page once, or re-enable the module, to reconcile the state.
FAQ
Does this turn maintenance mode on or off? No. It only reads whether your site is in maintenance or coming-soon mode. You still control maintenance mode with WordPress or your maintenance plugin.
Which maintenance plugins are supported?
WordPress core maintenance, the legacy .maintenance file, SeedProd, Elementor maintenance/coming-soon mode, and WP Maintenance Mode. Other tools can report their state through the xspeed_is_maintenance_mode filter.
How can I check the current state from the command line?
Run wp xspeed maintenance-cache status. It prints whether the feature is enabled and whether the site is currently in maintenance mode.
Related
- Purging the Cache
- How to Enable Page Cache
- Configuring the Cache Preloader