
Every WordPress site owner eventually faces a moment when they need to take their site offline — updating a major plugin, switching themes, migrating to a new server, or rebuilding a section from scratch. The wrong approach leaves visitors staring at a broken page or a PHP error. The right approach shows a professional, branded maintenance screen while you work quietly in the background.
This guide covers everything you need to know about WordPress maintenance mode: how it works under the hood, the best plugins for the job, how to set it up manually with code, and critically, how to avoid harming your SEO rankings while the site is down.
Quick answer: For most sites, install SeedProd or WP Maintenance Mode, design your maintenance page, and activate it with one click. Return a 503 HTTP status to protect SEO. Remove it immediately once your update is done.
How WordPress Maintenance Mode Works
When WordPress runs its built-in auto-updater, it creates a file called .maintenance in your WordPress root directory. This file contains a single line:
<?php $upgrading = time(); ?>
While this file exists and its timestamp is within the last 10 minutes, WordPress intercepts all front-end requests and serves a default "Briefly unavailable for scheduled maintenance" message with a plain white page. Once the update completes (or 10 minutes pass), the file is automatically deleted and the site returns to normal.
This built-in mechanism is functional but bare — no branding, no estimated time, no way to collect email addresses. That is why most site owners use a plugin or custom code to replace this default behavior with a polished, customizable maintenance page.
The Importance of HTTP 503 During Maintenance
Before diving into plugins, you need to understand one critical technical requirement: your maintenance page must return HTTP status 503 (Service Unavailable), not 200 (OK).
Here is why this matters for SEO:
- 200 OK + blank/simple page — Google sees this as your actual content and may replace your real page content in its index with the empty maintenance page. This can immediately tank your search rankings.
- 503 Service Unavailable — Search engine crawlers understand this means a temporary outage. They note to revisit the URL soon and do not update their index. Your existing ranking is preserved during the maintenance window.
- Retry-After header — Pairing 503 with a
Retry-Afterheader (e.g.,Retry-After: 3600for one hour) tells bots exactly when to come back, making the process even cleaner.
Important: Logged-in administrators should always see the normal site, not the maintenance page. Every good maintenance mode plugin handles this automatically. Verify this by testing in a private/incognito window to see what visitors see, then in your regular browser (where you are logged in) to confirm admin access works.
Method 1: Using a Plugin (Recommended)
Plugins are the easiest and most flexible way to enable maintenance mode on WordPress. Here are the top options:
SeedProd — Best for Coming Soon & Maintenance Pages
SeedProd is the most popular dedicated coming-soon and maintenance-mode plugin, with over one million active installs. Its drag-and-drop builder lets you create fully branded pages without touching code.
- Visual drag-and-drop page builder — no coding required
- Pre-built templates for maintenance, coming soon, and 404 pages
- Email optin forms to collect leads while the site is down
- Social media links and countdown timers
- Correct 503 status code returned automatically
- Logged-in administrators bypass the maintenance page
- Free version available; Pro adds WooCommerce integration and more templates
How to set it up:
- Install and activate SeedProd from WordPress Dashboard → Plugins → Add New
- Go to SeedProd → Pages
- Under "Maintenance Mode", click Set up a Maintenance Mode Page
- Choose a template and customize it with your logo, message, and colors
- Click Save, then toggle Maintenance Mode to Active
- Test in an incognito window to confirm visitors see the maintenance page
- When done, return to SeedProd → Pages and toggle Maintenance Mode to Inactive
WP Maintenance Mode & Coming Soon — Lightweight Alternative
If you want a simpler, lighter plugin without the page builder, WP Maintenance Mode (by Designmodo) is an excellent free choice with over 900,000 active installs.
- Simple settings page — no page builder complexity
- Built-in countdown timer and email subscription
- Google Analytics integration for tracking visitors during downtime
- Correct 503 status code
- Whitelist specific IP addresses to bypass maintenance mode
- Custom CSS for styling
Setup steps:
- Install WP Maintenance Mode from the WordPress Plugin Directory
- Go to Settings → WP Maintenance Mode
- On the General tab, set Status to Activated
- Customize the Design tab with your background, headline, and text
- Click Save Settings
LightStart — Flexible and Free
LightStart (formerly Colorlib Maintenance Mode) offers a clean free option with three modes: Maintenance Mode, Coming Soon, and Landing Page. Each mode has its own set of templates and options, and the plugin integrates with popular page builders like Elementor if you already use them.
Plugin comparison tip: Use only one maintenance mode plugin at a time. Multiple plugins handling 503 responses can conflict and cause unexpected behavior. Deactivate and remove any plugin you are not using.
Method 2: Enable Maintenance Mode Without a Plugin
If you prefer not to add a plugin, you can enable maintenance mode with a small snippet of PHP code. This is ideal for developers who want full control without plugin overhead.
Option A: Using functions.php
Add the following code to your child theme's functions.php file. Never edit the parent theme directly — your changes will be overwritten when the theme updates.
// Enable maintenance mode for non-admins
function asiagb_maintenance_mode() {
if ( ! current_user_can( 'administrator' ) ) {
wp_die(
'<h1>We\'ll Be Right Back</h1><p>Our site is currently undergoing scheduled maintenance. Please check back shortly.</p>',
'Under Maintenance',
array( 'response' => 503 )
);
}
}
add_action( 'get_header', 'asiagb_maintenance_mode' );
To disable maintenance mode, simply remove this code from functions.php.
Option B: Custom maintenance.php File
Create a file named maintenance.php at your WordPress root directory (same level as wp-config.php). WordPress will automatically detect and serve this file during the maintenance period when a .maintenance file also exists.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Scheduled Maintenance — Back Soon</title>
<meta name="robots" content="noindex">
<?php header('HTTP/1.1 503 Service Unavailable'); ?>
<?php header('Retry-After: 3600'); ?>
</head>
<body style="font-family:sans-serif;text-align:center;padding:80px 20px;">
<h1>Scheduled Maintenance</h1>
<p>We are currently updating our site. We will be back online shortly.</p>
</body>
</html>
Then create the trigger file. Connect via FTP or SSH and run:
# Create the .maintenance trigger file
echo "<?php \$upgrading = time(); ?>" > /path/to/wordpress/.maintenance
To exit maintenance mode, simply delete the .maintenance file.
Warning: Be careful when editing functions.php. A PHP syntax error in this file will cause a white screen of death (WSOD) and lock you out of the admin dashboard. Always test changes on a staging environment first, or use a plugin method if you are less comfortable with PHP.
Maintenance Mode Best Practices for SEO
Maintenance downtime, when handled correctly, has almost no lasting impact on your SEO rankings. Follow these best practices to protect your site's position in search results:
Always Return 503, Not 200
This is the single most important rule. Verify your status code using a tool like httpstatus.io or the Network tab in your browser's developer tools. If you see 200 on your maintenance page, switch to a plugin or fix your code immediately.
Keep Downtime Under 2 Hours
For routine plugin updates or theme changes, plan your work carefully and aim to complete everything within one to two hours. Prepare your update steps in advance, use your backup plugin to take a full site backup before starting, and work efficiently.
Add a Retry-After Header
Tell search engine crawlers exactly when to come back. In PHP, add this at the top of your maintenance page:
<?php header('Retry-After: 3600'); ?> // 3600 seconds = 1 hour
SeedProd and most quality maintenance plugins set this header automatically. Check your plugin documentation to confirm.
Add noindex to the Maintenance Page
Even though a 503 status code prevents indexing in theory, adding <meta name="robots" content="noindex"> to your maintenance page adds a belt-and-suspenders layer of protection. Most maintenance plugins do this by default.
Schedule Maintenance During Low-Traffic Hours
Check your Google Analytics or hosting statistics to find when your site receives the fewest visitors — often early morning in your target timezone. Schedule major updates and migrations during this window to minimize visitor disruption.
Use a Staging Site for Major Changes
For significant redesigns, database migrations, or major plugin upgrades, do all the work on a staging site first. Once everything is tested and working, deploy the changes to production quickly — minimizing the maintenance window to minutes instead of hours. See our guide on WordPress staging workflow for a step-by-step approach.
Creating a Professional Maintenance Page
A maintenance page is an opportunity to reinforce your brand and maintain visitor trust even during downtime. Here are the elements every good maintenance page should include:
- Your logo and brand colors — Visitors should immediately recognize the site they tried to reach
- Clear, friendly message — Explain briefly what is happening and that it is temporary. Avoid technical jargon.
- Estimated return time — A countdown timer or simple text ("Back by 3 PM today") reduces frustration
- Contact information — For urgent inquiries, provide an email address or social media link
- Email signup form — Optional, but effective for capturing leads while the site is being improved
- Social media links — Let visitors follow for real-time updates
Avoid making your maintenance page too complex — it should load instantly even if your main site has database or resource issues during the update process.
Maintenance Mode for WooCommerce Sites
If you run a WooCommerce store, maintenance mode requires extra thought. Downtime means lost sales, so minimizing the maintenance window is even more important.
- Schedule updates at off-peak hours — Check your WooCommerce analytics for the slowest sales period each week
- Communicate in advance — Send an email to customers warning of brief maintenance, especially if it affects checkout
- Use SeedProd Pro or a WooCommerce-compatible plugin — Some maintenance plugins can exempt the checkout and cart pages from maintenance mode, allowing orders to continue while you update other parts of the site
- Test checkout after maintenance — Always run a test transaction after re-enabling the site to confirm payment processing works correctly
- Back up before you start — Use your backup plugin to create a complete snapshot of files and database before any updates
Maintenance Mode Troubleshooting
Site Stuck in Maintenance Mode
The most common maintenance issue is WordPress getting stuck in maintenance mode after an interrupted update. This happens when the auto-updater creates the .maintenance file but something goes wrong before it can delete it.
Fix: Connect via FTP or your hosting file manager. Navigate to your WordPress root directory and delete the .maintenance file. The site will immediately return to normal.
Admin Cannot Access Dashboard
If your maintenance mode code in functions.php accidentally applies to all users including admins, use FTP to rename or delete the functions.php file temporarily. This will disable all custom functions and restore access. Fix the code, then re-upload the file.
Maintenance Page Not Showing
If you activated a maintenance plugin but visitors still see the normal site, check:
- Plugin is activated and the maintenance toggle is set to "Active" or "Enabled"
- You are testing in an incognito window (logged-in admins bypass maintenance mode by design)
- No page caching plugin is serving a cached copy of the normal site — flush your cache after enabling maintenance mode
- No CDN (such as Cloudflare) is serving a cached version — purge the CDN cache
Caching Issues After Disabling Maintenance Mode
After exiting maintenance mode, some visitors may still see the maintenance page due to browser or server caching. Fix this by:
- Flushing your WordPress caching plugin's cache (WP Super Cache, W3 Total Cache, etc.)
- Purging your CDN cache if you use Cloudflare or a similar service
- Setting a short cache TTL on the maintenance page itself (avoid caching it at all)
Maintenance Mode Checklist
| Task | Status |
|---|---|
| Full site backup (files + database) taken | ☐ |
| Maintenance mode plugin installed and configured | ☐ |
| Maintenance page returns HTTP 503 (verified with httpstatus.io) | ☐ |
| Retry-After header set | ☐ |
| Admin can still access WordPress dashboard | ☐ |
| Maintenance page tested in incognito window | ☐ |
| Updates / changes completed and tested | ☐ |
| Maintenance mode disabled | ☐ |
| Cache flushed (WordPress + CDN) | ☐ |
| Site verified working normally in incognito window | ☐ |
Enabling WordPress maintenance mode correctly is one of the simplest yet most important skills for any site administrator. Whether you use a plugin like SeedProd or a lightweight code snippet, the key principles are the same: return a proper 503 status, keep downtime short, and always test before and after. With the right setup, your visitors see a professional page, your search rankings remain protected, and you can work on your site with confidence. If you need a reliable hosting environment to support your WordPress workflow — including fast backups, easy updates, and 99% uptime — see what AsiaGB has to offer below.
WordPress Hosting with DirectAdmin — Fast & Reliable
AsiaGB Hosting includes DirectAdmin control panel, one-click WordPress install, free SSL certificate, and automatic backups. 99% uptime SLA. Starting at ฿500/year.
View Hosting Plans →