Skip to content

Maintenance mode

The theme ships with a branded 21+ maintenance splash. No plugin dependency. Toggle it via Customize → Maintenance mode → Active → On and every non-logged-in visitor sees the splash. Admins and editors continue to see the live site.

Maintenance splash

Quick toggle

Customize → Maintenance mode → Active → OnSave & Publish.

Splash goes live immediately. All page caches auto-flush on save (Autoptimize, LiteSpeed, WP Rocket, W3TC, WP object cache).

To turn it off: Active → Off → Save & Publish.

Admin bar badge — "Maintenance: ON" (red) when active, "Live" (green) when off. Clicking opens the Customizer.

Editable splash content

Customize → Maintenance mode:

  • Eyebrow text — the pill at the top ("UNDER MAINTENANCE" default)
  • Heading — the display H1. HTML <span> allowed for gold-accent word
  • Sub-copy — supporting paragraph
  • Meta row 1: label / value — first ETA row
  • Meta row 2: label / value — second ETA row
  • Support email — link at the bottom
  • MC4WP form ID — form embedded in the splash

What visitors see

Visitor typeSees
AnonymousThe splash. HTTP 503 + Retry-After: 3600.
Admin / Editor (logged in)The live site.
Bot / crawlerThe splash (503) + robots.txt set to Disallow: / — nothing gets indexed.
/wp-login.php visitorThe login form. Admin access always preserved.
/wp-json/* REST callerThe API. AJAX and REST never gated.

Programmatic override

php
// Force off (recovery)
add_filter( 'dankcave_maintenance_active', '__return_false' );

// Force on
add_filter( 'dankcave_maintenance_active', '__return_true' );

// Allow specific IPs to bypass
add_filter( 'dankcave_maintenance_active', function ( $active ) {
    if ( $active && $_SERVER['REMOTE_ADDR'] === '203.0.113.42' ) {
        return false;
    }
    return $active;
} );

Cache flushing

Every save flushes: Autoptimize, LiteSpeed, WP Rocket, W3TC, WP object cache.

If your host has a separate CDN cache (Cloudflare, Bunny, Fastly), purge that manually.

The splash file

theme/template-parts/maintenance-splash.php — inline CSS + inline JS + no dependencies on the theme's asset pipeline. If the theme fatals, you can require the file directly from wp-config.php.

Dankcave theme v0.2.2