BD Maintenance Mode

Configuration & Access Control

Updated March 9, 2026 5 min read

Mode Selection

BD Maintenance Mode offers two distinct modes, each designed for a different scenario. You select the mode from the Mode card on the Settings tab.

Maintenance Mode

Use this when your site is temporarily down for updates, migrations, or fixes.

  • HTTP Response: 503 Service Temporarily Unavailable
  • Retry-After Header: Retry-After: 3600 (tells search engines and bots to come back in 1 hour)
  • SEO Impact: None — search engines treat 503 as a temporary condition and do not deindex your pages. They will revisit later.
  • Cache Prevention: The plugin sends nocache_headers() to prevent any caching layer from storing the maintenance page.
  • Robot Meta: <meta name="robots" content="noindex, nofollow"> is included in the page head.

Coming Soon Mode

Use this for pre-launch sites where you want a landing page that search engines can index.

  • HTTP Response: 200 OK
  • SEO Impact: Search engines may index the coming soon page. This is useful if you want your domain to appear in search results before launch.
  • Robot Meta: Still includes noindex, nofollow in the meta tag. If you want search engines to index the page, you would need to modify the template.

When to Use Which

ScenarioRecommended Mode
Updating plugins, themes, or WordPress coreMaintenance
Running database migrationsMaintenance
Redesigning your siteMaintenance
Brand new site not yet launchedComing Soon
Pre-launch landing page with countdownComing Soon

Custom Messaging

Headline

The main heading displayed on the maintenance page. If left empty, it defaults to “Under Maintenance” (maintenance mode) or “Coming Soon” (coming soon mode). Maximum length is limited by the WordPress sanitize_text_field() function. HTML is not allowed.

Message

The descriptive paragraph displayed below the headline. If left empty, a default message is used based on the mode. Stored as a textarea field, so line breaks in the input are allowed but HTML tags are stripped by sanitize_textarea_field().

Logo

An optional logo image displayed above the headline. You can either paste a URL or use the Upload button to select an image from the WordPress Media Library. The image is displayed at its natural size, constrained by CSS. To remove a logo, click the X button next to the URL field and save.

Background Image

An optional full-screen background image. When set, the maintenance page uses this as a CSS background-image covering the entire viewport, with a dark overlay div for text readability. Upload via the Media Library or paste a URL. A preview thumbnail appears below the URL field when an image is set.

Access Control

BD Maintenance Mode provides two mechanisms for allowing certain visitors to bypass the maintenance page and see the normal site.

Bypass Roles

In the Access Control section, you will see a grid of checkboxes listing all WordPress user roles on your site (Administrator, Editor, Author, Subscriber, Shop Manager, etc.). Check any roles that should bypass the maintenance page.

By default, only Administrator is checked. This means:

  • Administrators who are logged in will see the normal site.
  • All other logged-in users (Editors, Authors, Subscribers, etc.) will see the maintenance page.
  • Logged-out visitors always see the maintenance page.

If you want your content team to continue working during maintenance, check the Editor and Author roles as well.

The bypass check works by comparing the current user’s role against the list of bypass roles. If the user has any of the checked roles, they pass through.

IP Whitelist

Enter one IP address per line in the IP Whitelist textarea. Visitors from these IP addresses will see the normal site even if they are not logged in. This is useful for:

  • Allowing your development team to access the site without WordPress accounts
  • Letting a client review the site before launch
  • Whitelisting your office or VPN IP

The plugin detects visitor IPs by checking the following headers in order: HTTP_CF_CONNECTING_IP (Cloudflare), HTTP_X_FORWARDED_FOR (reverse proxy — uses the first IP in the list), HTTP_X_REAL_IP, and finally REMOTE_ADDR. This ensures correct IP detection behind CDNs and load balancers.

Paths That Are Never Blocked

Certain WordPress paths are always accessible, even when maintenance mode is active. This prevents admin lockouts and keeps critical functionality working:

  • /wp-admin — the WordPress admin dashboard
  • /wp-login.php — the login page
  • /admin-ajax.php — AJAX requests from the admin
  • /wp-cron.php — WordPress cron execution
  • /wp-json/ — REST API endpoints
  • bd-maintenance-mode/assets/ — the plugin’s own CSS and JS files needed to render the maintenance page

These paths are checked using a simple strpos() comparison against the request URI. The block fires very early on the template_redirect action at priority 0, before any theme or other plugin output.

Styling and Page Structure

The maintenance page is a self-contained HTML document that does not use your WordPress theme. It loads a single CSS file (bdmm-front.css) from the plugin’s assets/css/ directory.

Page Structure

<body class="bdmm-page bdmm-has-bg"> <div class="bdmm-overlay"></div> <!-- dark overlay (only with bg image) --> <div class="bdmm-container"> <div class="bdmm-logo">...</div> <!-- optional logo --> <h1 class="bdmm-headline">...</h1> <!-- headline text --> <p class="bdmm-message">...</p> <!-- message text --> <div class="bdmm-countdown">...</div> <!-- optional countdown --> </div> </body>

Key CSS classes you can target if you add custom CSS:

  • .bdmm-page — the body element
  • .bdmm-has-bg — added to the body when a background image is set
  • .bdmm-overlay — the semi-transparent dark overlay on top of the background image
  • .bdmm-container — the centered content wrapper
  • .bdmm-headline — the main heading (h1)
  • .bdmm-message — the message paragraph
  • .bdmm-countdown — the countdown container
  • .bdmm-countdown-box — each individual countdown unit (days, hours, minutes, seconds)
  • .bdmm-countdown-number — the numeric value in each countdown box
  • .bdmm-countdown-label — the label text (“Days”, “Hours”, etc.)

SEO Considerations

Maintenance Mode (503)

  • The 503 status code tells search engines that the unavailability is temporary. Google will not deindex your pages.
  • The Retry-After: 3600 header suggests search engine bots should come back in 1 hour.
  • Prolonged 503 responses (weeks or months) may eventually cause search engines to deindex your content. Use Coming Soon mode for extended pre-launch periods.

Coming Soon Mode (200)

  • The 200 status code means the page is treated as normal content. Search engines may index it.
  • The noindex, nofollow meta tag is still present, which instructs well-behaved search engines not to index the page.
  • This mode is ideal for new sites that do not yet have existing SEO rankings to protect.

Settings Storage

All settings are stored in a single serialized array under the WordPress option bdmm_settings. The complete list of setting keys and their defaults:

Setting KeyTypeDefaultDescription
enabledBooleanfalseMaster switch for maintenance mode
modeStringmaintenance“maintenance” or “coming_soon”
headlineStringEmptyCustom headline text
messageStringEmptyCustom message text
logo_urlURLEmptyURL to a logo image
bg_image_urlURLEmptyURL to a background image
countdown_enabledBooleanfalseShow the countdown timer
countdown_dateStringEmptyTarget datetime for the countdown
bypass_rolesArray["administrator"]WordPress roles that bypass the block
whitelist_ipsStringEmptyNewline-separated list of whitelisted IPs
response_codeInteger503HTTP response code (automatically set by mode)
license_keyStringEmptyLicense key (preserved across saves)
license_emailStringEmptyLicense email (preserved across saves)

Deactivation

When you deactivate the BD Maintenance Mode plugin, the maintenance page immediately stops showing. Your settings are preserved in the database so that reactivating the plugin restores your previous configuration.

The plugin has no cron hooks or database tables to clean up on deactivation.