WordPress Maintenance Mode: How to Turn It On, Off, and Fix It When It's Stuck
Maintenance mode shows visitors a short notice while you work on the site. WordPress switches it on by itself during every update. Here is how to turn it on yourself, three ways, and how to get a site out of it when an update leaves it stuck.
In this article
Key takeaways
- WordPress turns maintenance mode on by itself during updates, with a .maintenance file and a 503 notice.
- A plugin is the easiest way to turn it on yourself, and logged-in admins still see the site.
- WP-CLI's wp maintenance-mode activate uses the same file: nobody can get in, and it ends after 10 minutes.
- A few lines of code in a must-use plugin show a 503 page to visitors who can't edit the site.
- Stuck on "Briefly unavailable"? Delete the .maintenance file in the site's root folder, then finish the update.
- Keep it short: a 503 for an hour is fine, for days it can cost you rankings.
The short answer
For planned work, use a maintenance mode plugin, which keeps the site open to you while visitors see a notice. The options:
- A plugin: install one such as Maintenance or SeedProd, switch maintenance mode on, and switch it off when you’re done.
- WP-CLI: run
wp maintenance-mode activate, thenwp maintenance-mode deactivate. It locks out admins too and ends by itself after 10 minutes. - Code: a few lines in a must-use plugin show a 503 page to everyone who can’t edit the site.
Stuck on “Briefly unavailable for scheduled maintenance. Check back in a minute.”? Delete the .maintenance file in the site’s root folder, then finish the update that left it there.
The plugin details below were checked in the WordPress.org plugin directory on 9 November 2026.
What WordPress does by itself
Every time you update WordPress, a plugin or a theme, WordPress puts the site in maintenance mode for a moment:
- It creates a file called
.maintenancein the site’s root folder, next towp-config.php, holding the time the update started. - Every visitor gets the notice “Briefly unavailable for scheduled maintenance. Check back in a minute.” with a 503 status and a
Retry-After: 600header, which tells search engines to come back in 10 minutes. - When the update finishes, WordPress deletes the file and the site comes back.
Two details matter later on. This built-in mode runs before WordPress knows who is logged in, so it blocks everyone, admins included. And WordPress ignores a .maintenance file that’s more than 10 minutes old, so a failed update can’t take a site down for good on its own.
To replace that notice with your own page, add a file called maintenance.php to wp-content. WordPress shows it during updates instead. Have it send the 503 status itself:
<?php
// wp-content/maintenance.php: shown instead of WordPress's notice during updates.
http_response_code( 503 );
header( 'Retry-After: 600' );
?>
<!doctype html>
<title>Back in a minute</title>
<h1>We're updating the site</h1>
<p>It will be back in a minute.</p>
Way 1: with a plugin
A plugin is the right tool for anything longer than an update: a redesign, a migration or a content freeze. You stay logged in and keep working while visitors see a branded page. These are the most-installed options in the plugin directory:
| Plugin | By | Active installs | Last updated | Notes |
|---|---|---|---|---|
| Maintenance | WebFactory | 1,000,000+ | 4 Nov 2026 | Sends a 503, lets you log in from the front end, can leave chosen pages open |
| SeedProd | SeedProd | 600,000+ | 4 Nov 2026 | Separate coming soon and maintenance modes, with a page builder |
| LightStart | Themeisle | 400,000+ | 29 Oct 2026 | Maintenance, coming soon and landing page modes |
| CMP | NiteoThemes | 200,000+ | 16 Oct 2026 | Coming soon and maintenance pages with themes |
All four were tested with WordPress 7.1.4, according to their listings on 9 November 2026. To use one:
- Install and activate it from Plugins → Add New.
- Open its settings and choose maintenance mode, not coming soon mode. Maintenance mode should answer with a 503 status, which tells search engines the outage is temporary.
- Write a short message: what’s happening and when you’ll be back. Add your logo if the plugin allows it.
- Switch it on, then open the site in a private window to check what visitors see.
- When you’re done, switch it off, and clear your page cache so nobody keeps getting the stored notice.
Way 2: with WP-CLI
If you can run WP-CLI on the server, maintenance mode is two commands:
wp maintenance-mode activate
# ...do the work...
wp maintenance-mode deactivate
# Check the state:
wp maintenance-mode statusThe command writes the same .maintenance file that updates use, so two rules apply:
- Nobody gets in, admins included, so do the work itself from WP-CLI or the server.
- It ends by itself after 10 minutes. To keep it on longer, run
wp maintenance-mode activate --forceagain before then, which restarts the clock.
That makes it a good fit for short scripted jobs, such as a database change or a deployment, rather than an afternoon of work.
Way 3: with a few lines of code
Without a plugin, a must-use plugin can show a 503 page to visitors while anyone who can edit the site sees it as normal. Create wp-content/mu-plugins/maintenance-page.php (make the mu-plugins folder if it isn’t there) with this:
<?php
/**
* Plugin Name: Maintenance page
* Description: Shows visitors a 503 maintenance page. Delete this file to turn it off.
*/
add_action( 'template_redirect', function () {
if ( current_user_can( 'edit_posts' ) ) {
return; // editors and admins see the site as normal
}
header( 'Retry-After: 3600' );
wp_die(
'<h1>We\'ll be back soon</h1><p>We\'re updating the site and will be back within the hour.</p>',
'Maintenance',
array( 'response' => 503 )
);
} );- Must-use plugins load automatically, so the page goes up as soon as the file is saved. Delete the file to take it down.
- It only covers the front end. The login page and wp-admin keep working, so you can still sign in.
Retry-After: 3600asks search engines to come back in an hour. Set it to roughly how long the work will take.- Put it in
mu-pluginsrather than your theme’sfunctions.php, so it keeps working if you switch themes and is easy to find later.
Stuck on "Briefly unavailable for scheduled maintenance"?
This happens when an update stops halfway, for example because the browser tab was closed or the server timed out, and the .maintenance file is left behind. WordPress’s own documentation gives the fix: delete that file.
- Connect to the site with your host’s file manager, SFTP or SSH.
- Open the root folder, the one with
wp-config.phpin it. The file name starts with a dot, so turn on show hidden files if you don’t see it. - Delete
.maintenance. With WP-CLI,wp maintenance-mode deactivatedoes the same. - Reload the site. If it loads, go to Dashboard → Updates and run again any update that didn’t finish.
- If a plugin’s update failed halfway, its folder may be incomplete. Reinstall that plugin.
Still showing the message long after? WordPress ignores the file after 10 minutes, so look elsewhere: a page cache or CDN may be serving a stored copy of the notice, so purge it; a maintenance plugin may still be on; or another update may have started. If the site shows a blank page or a critical error once the notice is gone, the update broke something. Our guides to the white screen of death and the critical error message cover those.
Keep it short and search-friendly
- Send a 503, not a 200. A maintenance page that answers with a normal 200 can end up in search results in place of your real pages.
- Hours, not days. Search engines treat a 503 as temporary. Kept up for days, it can start to cost you pages in the results.
- Pick the quiet hour. Check your analytics for the time with the fewest visitors, and say in the notice when you’ll be back.
- Make the window smaller. Try updates and big changes on a staging copy first, so the live site only needs a few minutes. Our WordPress security checklist covers the rest of that routine.
- Clear the cache afterwards, so no visitor keeps getting the notice.
Where WPOS fits
The best maintenance window is a short one. WPOS puts an AI agent inside wp-admin on the sites you already run, on any host, and the free trial comes with a staging sandbox next to the live site for trying updates first. The agent checks its own render with a browser screenshot before it reports a change as done, and it can put up a maintenance page as a small code snippet and take it down again afterwards. A maintenance window becomes one request:
“Put up a maintenance page that says we’re back by 14:00 UTC, update all plugins, take a screenshot of the home, pricing and contact pages, and take the maintenance page down if they all look right.”
WPOS is our product, so weigh this section accordingly; you can try it free for 30 days with 5,000 credits, a live site plus a staging sandbox, and no card.
Frequently Asked Questions
Add a few lines of code as a must-use plugin that show a 503 page to everyone who can't edit the site, or run wp maintenance-mode activate with WP-CLI. The WP-CLI command locks everyone out, admins included, and ends by itself after 10 minutes.
If a plugin turned it on, switch it off in the plugin's settings. If you see "Briefly unavailable for scheduled maintenance", delete the .maintenance file in the site's root folder, or run wp maintenance-mode deactivate. Then clear your page cache.
An update didn't finish and left the .maintenance file behind. WordPress ignores that file once it's 10 minutes old, so if the message is still there much later, a page cache or CDN is probably serving a stored copy of it, or a maintenance plugin is still on.
Not if it sends a 503 status and stays short. A 503 tells search engines the site is down temporarily and to come back later. Kept up for days, it can start to cost you pages in search results.
Yes, with a maintenance plugin or the code in this guide: logged-in editors and admins see the site as normal. With the .maintenance file, which updates and WP-CLI use, nobody can, admins included.
Maintenance mode is for a live site that's down for a short while, and should answer with a 503. A coming soon page is for a site that hasn't launched yet, and usually answers with a normal 200 so search engines can find it.
Start free with 15,000 credits.
Three times the usual 5,000, no card needed. Then 50% off your site licences for 2 months with FRIDAY50.
Try the update in a sandbox first.
WPOS puts an AI agent inside wp-admin on the sites you already run, on any host, and it checks its own work. Free for 30 days: 5,000 credits, a live site plus a sandbox, no card.