Repository navigation
Maintenance mode
Maintenance mode shows visitors a short "back soon" page while you work on the site. The page comes with HTTP status 503, which search engines understand as temporary. Logged-in staff keep seeing the normal site, and payment callbacks, the REST API and cron keep working.
| Module ID | maintenance |
| Default | Off |
| Available | Always |
| WP-CLI | None. wp shouse module enable maintenance and wp shouse module disable maintenance switch it. |
| Since | 0.1.0 |
Maintenance mode stops front-end page views on WordPress's template_redirect hook, at priority 0. A visitor who is not let through gets:
- HTTP status 503.
- A
Retry-Afterheader with the Expected duration (minutes) in seconds, never less than 300. The default of 60 minutes givesRetry-After: 3600. The setting starts at 5 minutes, so the lowest value sent is 300. - An
X-Robots-Tag: noindexheader and<meta name="robots" content="noindex">in the page. - WordPress's no-cache headers. SafeHouse also defines
DONOTCACHEPAGE, the constant page cache plugins check before they store a page.
The page is a page of its own, not your theme. It shows the site name, the headline ("We will be back soon" when Headline is empty) and your message, and it follows the visitor's light or dark mode. The browser tab reads HEADLINE – SITE NAME. There is no logo, no stylesheet of your own and no template to override. Because the theme does not run, nothing that plugins add to the theme's <head> or footer appears on it, such as Header and footer scripts.
Logged-in users with the capability chosen in Who sees the normal site see the normal site. Everyone else gets the maintenance page, including logged-in users without that capability.
| Option | Capability | With WordPress's standard roles |
|---|---|---|
| Administrators | manage_options |
Administrators |
| Anyone who can edit content (default) | edit_posts |
Contributors, authors, editors and administrators |
| Every logged-in user | read |
Every logged-in user, subscribers included |
WooCommerce customers have only read. With the default option, a logged-in customer gets the maintenance page too. Choose Every logged-in user if customers must reach the shop while it is on.
Maintenance mode never blocks wp-login.php, so staff and customers can log in there. The WooCommerce My Account page is a front-end page, so its login form is behind the maintenance page.
These requests are never blocked:
- wp-admin,
wp-login.phpandadmin-ajax.php - WP-Cron
- the REST API, including the WooCommerce Store API that the block cart and checkout use
- WooCommerce's
?wc-api=callbacks - WP-CLI
-
robots.txtand the favicon
A payment callback passes only when the gateway sends it to a ?wc-api= address or to the REST API. SafeHouse has no list of payment gateways and does not detect them. The gateways named under Integrations are for information only. A callback sent to an ordinary front-end page gets the maintenance page like any visitor.
SafeHouse makes no exception based on request headers or the query string, because whoever sends the request controls both. Adding an empty ?wc-api= to a page address does not open the site.
For everyone who cannot see the normal site, every other front-end request gets the maintenance page, including:
- RSS and Atom feeds
- WordPress's XML sitemaps (
/wp-sitemap.xml) - the cart, the checkout page and My Account
- the order confirmation page that a customer returns to after paying
Without clearing, a page cache would keep serving the normal pages after you switch maintenance mode on, or the maintenance page after you switch it off. When the module is switched on or off through a settings save (Save Changes, or wp shouse module enable|disable maintenance), SafeHouse:
- Writes a
maintenancewarning to the activity log: "Maintenance mode switched on" or "Maintenance mode switched off". - Clears these page caches, where they are installed:
- LiteSpeed Cache, through its
litespeed_purge_allaction. The same action also clears SafeHouse's own LiteSpeed page cache and Cloudflare cache when those modules run. - WP Rocket
- W3 Total Cache
- WP Super Cache
- Autoptimize
- LiteSpeed Cache, through its
Every save of SafeHouse settings also clears the caches of the LiteSpeed page cache and Cloudflare cache modules when they run. Other caches are not cleared: without the Cloudflare cache module, clear Cloudflare page caching (APO or a Cache Everything rule) in the Cloudflare dashboard, and clear a host's server cache with the host's tools.
Changing the headline, message or duration does not run this cache clearing. The maintenance page itself is sent with no-cache headers and DONOTCACHEPAGE, so page caches that honor them do not store it.
While the module runs, users with manage_options see Maintenance mode is on in the admin bar, on the front end and in wp-admin. It links to the module's settings. Other users who see the normal site, such as editors, do not get the note.
On SafeHouse → Modules → Maintenance mode, select Details.
| Setting | Default | What it does |
|---|---|---|
| Headline | Empty | The page heading. Empty shows "We will be back soon". Plain text, up to 200 characters. |
| Message | Empty | "Basic HTML allowed (links, bold, line breaks)." Up to 2000 characters. Line breaks become paragraphs. |
| Expected duration (minutes) | 60 | "Sent to search engines as Retry-After." From 5 to 10080 (7 days). |
| Who sees the normal site | Anyone who can edit content | Administrators, Anyone who can edit content or Every logged-in user. See Who sees the normal site. |
- Go to SafeHouse → Modules → Maintenance mode and select Details.
- Enter a Headline and a Message.
- In Expected duration (minutes), enter how long the work should take.
- In Who sees the normal site, choose who keeps access.
- Turn on the Maintenance mode switch.
- Select Save Changes.
The admin bar shows Maintenance mode is on. To check the visitor's view, open the site in a private window.
With WP-CLI:
wp shouse module enable maintenanceThis counts as a settings save, so it also clears the caches and writes the log entry.
- Go to SafeHouse → Modules.
- Turn off the Maintenance mode switch.
- Select Save Changes.
With WP-CLI:
wp shouse module disable maintenanceMaintenance mode does not end by itself when the expected duration has passed.
To switch maintenance mode from wp-config.php, for example during a deploy, pin it with SHOUSE_MODULES:
define( 'SHOUSE_MODULES', [ 'maintenance' => true ] );The switch on the settings page is then locked and shows "Pinned by SHOUSE_MODULES in wp-config.php." Set the value to false to switch maintenance mode off. Removing the line hands control back to the switch on the settings page, so maintenance mode stays on if that switch is on.
Changing SHOUSE_MODULES does not go through a settings save. SafeHouse then clears no page cache and writes no activity log entry, so clear your page caches yourself after each change to the line.
- The settings in the option
shouse_settings. - A
maintenanceactivity log entry for each switch on or off through a settings save.
It sets no cookies.
- No gateway detection. Payment callbacks pass only when they use
?wc-api=or the REST API. - Feeds and WordPress's sitemaps get the maintenance page.
- Guests returning from a payment see the maintenance page instead of the order confirmation.
- Logged-in WooCommerce customers see the maintenance page unless Who sees the normal site is Every logged-in user.
- There is no way to let a visitor through by IP address or with a secret link. Visitors must log in.
- The page shows a headline and a message only. There is no logo, design option or template.
- Only the caches listed above are cleared, and only on a switch through a settings save. Pinning with
SHOUSE_MODULESclears nothing. - Safe mode stops every module, so the site is public while safe mode is on (see Recover from a lockout).
- It does not switch off by itself.
These pages describe SafeHouse 0.2.0 and were last reviewed on 2026-10-07. · Repository · Releases · Changelog · Report a problem with these pages
Search every page and heading in the Pages box.
Start here
Modules
- All modules
- Security: Hardening · Login limits · Bot protection · Install lockdown
- Alerts: Change alerts · Plugin health · Vulnerability alerts
- Performance: LiteSpeed page cache · Cloudflare cache · Redis object cache
- WooCommerce: Omnibus price history
- Site tools: SMTP mail · Header and footer scripts · Duplicate posts and pages · Maintenance mode · Tweaks
Guides
- Behind Cloudflare or a proxy
- Running with Wordfence
- Configure in wp-config
- Deploy with git or CI
- Replacing other plugins
- Upgrade from WPHouse
Reference
Trust
Help