Documentation / Pantry Maintenance
Pantry Maintenance
Contents: A maintenance or coming-soon page, with a switch.
A maintenance or coming-soon page, with a switch. Part of Plugin Pantry, built to the Pantry Standard.
What it does
- One switch to show a holding page to visitors: Plugin Pantry > Maintenance.
- Two modes:
- Maintenance sends a
503 Service Unavailablestatus withRetry-After: 3600, so search engines wait and try again later. - Coming soon sends a normal
200status with<meta name="robots" content="noindex,nofollow">, so the page can be shared but is not indexed.
- Maintenance sends a
- Headline, message (basic HTML formatting: links, bold, italic, paragraphs, lists), a logo from the media library, and a background and text colour.
- One built-in page design. All CSS is inline in the page itself; nothing is loaded from outside the site.
- Bypass for logged-in users who hold a capability you choose (from "any logged-in user" up to "administrators only"), and for a list of IP addresses.
- Never blocks
wp-login.php,wp-admin, REST requests, cron or WP-CLI, regardless of the switch. - An admin bar indicator ("Maintenance mode is on" / "Coming soon is on") while the page is active, linking back to the settings screen.
- A preview link on the settings screen that shows the page exactly as a visitor would see it, without switching it on for anyone else.
What it does not do
- No template gallery: one design.
- No countdown timer.
- No email capture.
- No page builder.
These may appear in a separate Pantry Maintenance Pro add-on later. The free plugin keeps working as-is either way.
Usage
- Go to Plugin Pantry > Maintenance.
- Set the headline, message, logo and colours under "Page content".
- Choose the mode and who bypasses the page under "General".
- Use Preview holding page to check it while logged in, without affecting visitors.
- Tick Enable and save.
- Turn it back off the same way when the work is done.
Choosing a mode
Use Maintenance while you are actively working on the site: the 503 status tells search engines this is temporary, and they will come back rather than dropping pages from their index.
Use Coming soon for a site that has not launched yet: a 200 status means the page itself can be indexed if you want that, but noindex keeps it out of search results until you turn the plugin off.
Bypass
- Bypass for controls which logged-in users still see the real site: any logged-in user, authors and above, editors and above, or administrators only.
- Bypass IP addresses is a plain list, one address per line. Anyone browsing from a listed address sees the real site even when logged out. Lines that are not a valid IP address are dropped when you save.
Filters
Both are for developers; neither changes default behaviour.
pantry_maintenance_visitor_ip
Filters the IP address checked against the bypass list. Useful on a site behind a proxy or CDN, where REMOTE_ADDR is not the visitor's real address.
add_filter( 'pantry_maintenance_visitor_ip', function ( string $ip ): string {
if ( ! empty( $_SERVER['HTTP_CF_CONNECTING_IP'] ) ) {
return sanitize_text_field( wp_unslash( $_SERVER['HTTP_CF_CONNECTING_IP'] ) );
}
return $ip;
} );
pantry_maintenance_page_data
Filters the data passed to the holding page template before it renders: mode, headline, message, logo (attachment ID), background and text (hex colours).
add_filter( 'pantry_maintenance_page_data', function ( array $data ): array {
$data['headline'] = 'Back online at 3pm UTC';
return $data;
} );
Support
Comparison
How Pantry Maintenance compares with the popular plugins that do the same job, and when one of them is the better choice.
Pantry Maintenance compared with SeedProd, Maintenance and LightStart