WordPress stuck in maintenance mode means an update left its .maintenance file behind. Delete that file from WordPress’s main folder, or run wp maintenance-mode deactivate, and the site comes back. Then check that the update it was running actually finished.
Each case below was tested on our lab install of WordPress 7.1.3 (nginx 1.24.0, PHP-FPM 8.3.6), never on a live site. Two results surprised us: WordPress ignored the file once the time inside it was 10 minutes old, and an update we cut off midway left the plugin’s folder empty.
Why WordPress gets stuck in maintenance mode
Maintenance mode is the short pause WordPress puts the site in while it replaces plugin, theme or core files. The .maintenance file is how it does that: a one-line PHP file in WordPress’s main folder that holds the time the update started. While it exists, every page shows this:

The page arrived with HTTP status 503 Service Unavailable and a header named Retry-After set to 600 seconds. WordPress’s own code deletes the file when the update ends. In our tests it did so even when the update failed; the file only stayed when we killed the update process midway, the way a server timeout or a dropped connection could.
The handbook puts it simply: “The maintenance file may not have been removed properly.”
Delete the .maintenance file
Deleting .maintenance ends maintenance mode at once; our site returned 200 straight after. You can do it in three ways.
Through the hosting panel’s file manager, or FTP. These are the two file routes the handbook’s FTP page lists.
- Open WordPress’s main folder, where
wp-adminandwp-includessit. No file manager or FTP login? Ask your host for the SFTP or FTPS details, as the handbook’s FTP page suggests. - Turn on “show hidden files”, look for it in the file manager’s settings or view menu. Files whose names begin with a dot stay out of view otherwise; on our server,
.maintenanceonly appeared in a listing that included hidden files. - Download a copy of
.maintenanceif you want to keep a record, then delete it. - Reload the site.
With WP-CLI. WP-CLI, the command-line tool for WordPress, works if your host gives you SSH access. Its maintenance-mode command “Activates, deactivates or checks the status of the maintenance mode of a site”, according to the WP-CLI handbook. With WP-CLI 2.12.0 on our server:
$ wp maintenance-mode status
Maintenance mode is active.
$ wp maintenance-mode deactivate
Disabling Maintenance mode...
Success: Deactivated Maintenance mode.
That command deleted the file, and the site loaded. Add --path=/your/wordpress/folder if you run it from another directory, and --skip-plugins if a half-updated plugin makes WP-CLI stop with a fatal error. One catch: with a file whose time was over 10 minutes old, WP-CLI said “Maintenance mode is not active.” and refused to delete it, so remove that one by hand.
By waiting. WordPress’s code treats maintenance as over once the time in the file is 10 minutes old. Our file with a 601-second-old time no longer blocked the site. The next section covers what it means when waiting doesn’t work.
Why the message lasts longer than 10 minutes
If the message is still there after 10 minutes, the leftover file isn’t the whole story. This is what our tests showed:
| What we tried | Result on our test site |
|---|---|
.maintenance with the current time | 503 on every page, wp-admin and the login page included |
| The same file, 601 seconds old | 200: WordPress ignored it |
A file containing $upgrading = time(); instead of a fixed number | 503, even with the file’s date set two hours back, until we deleted it |
| No file | 200 |
The third row matters, because WordPress writes a fixed number, like <?php $upgrading = 1793586673; ?>. A file that calls time() resets its clock on every visit, so it never ages. We created that version by hand, the kind of thing a script or a well-meant edit could leave behind. Delete it like any other .maintenance file, and look for the script that wrote it.
Other possible causes, which we didn’t test, include a maintenance plugin, a maintenance switch in your host’s panel (the handbook lists one in Plesk’s WP Toolkit), or a cache still serving the old page. If a private window shows the site while your usual browser still shows the message, see our guide to changes not showing to track down which cache it is. We didn’t test a cache holding this page.
Check that the update finished
Getting the site back doesn’t mean the update worked, so open Plugins, Themes or Dashboard > Updates and check that the version is the one you were installing. If it’s still the old version, run the update again with the site loading normally.
We ran a real update of an active test plugin three ways. When WordPress couldn’t write the files, the update failed, the old version stayed and .maintenance was removed. A normal update created the file and removed it again at the end. When we killed the update process midway, .maintenance stayed and the plugin’s folder was empty: the old version was already removed and the new one not yet copied.
After we deleted .maintenance, WordPress deactivated that plugin with “Plugin file does not exist.” The old copy was still in wp-content/upgrade-temp-backup/plugins/, and copying that folder back to wp-content/plugins and activating it restored the plugin. Uploading the new version’s zip again also works. Our update failed guide covers the second one; when files can’t be written, as in our test, our file permissions guide explains what WordPress needs. If the site shows the critical error message after you delete the file, check the plugin or theme that was updating first; our critical error guide walks through switching it off.
Tell core maintenance mode from a maintenance plugin
Core’s page shows one sentence: “Briefly unavailable for scheduled maintenance. Check back in a minute.” If your page has a logo, a countdown or other text, something else made it, and deleting .maintenance won’t change it.
- A maintenance or “coming soon” plugin: switch it off in its settings, or rename its folder in
wp-content/plugins; to undo, rename it back and activate it again under Plugins. We didn’t test any of these plugins. - A
maintenance.phpfile inwp-content: WordPress loads this file, called a drop-in, instead of its own message while maintenance mode is on, that is, while the time in.maintenanceis under 10 minutes old.
A maintenance.php drop-in is a page you write yourself. Ours returned 200 unless its first line set the status code, so add one if you use it:
<?php http_response_code( 503 ); header( 'Retry-After: 600' ); ?>
<!doctype html><title>Updating</title><h1>We are updating the site. Back in a few minutes.</h1>
Keep updates from leaving the site in maintenance
In WordPress 7.1.3’s code, maintenance mode only starts for plugin updates that include an active plugin, theme updates that include the theme in use, and core updates (on multisite, for any of them). Updates to inactive plugins don’t switch it on. Since only a stopped update left the file in our tests:
- Run updates to active plugins, your theme and core when you can watch them finish.
- Take a backup first; our WordPress errors guide lists what to keep before you change anything.
Frequently Asked Questions
Why does the dashboard report a failed automated update after the site came back?
On our test site, a .maintenance file older than 10 minutes let the site load but put this notice on the dashboard: “An automated WordPress update has failed to complete – please attempt the update again now”. Deleting the file removed the notice. Then check the versions as above; our update failed guide covers the notice’s other cause.
Is it safe to delete the .maintenance file?
Yes, if no update is still running. Deleting it on our test site brought every page back with nothing else changed. If you’re unsure, wait a few minutes, delete it, then check the version of whatever was updating.
Does maintenance mode hurt SEO?
We didn’t measure that. WordPress’s page sends a 503 status with Retry-After 600. A stuck page that lasts for days is a different matter, so remove it as soon as you notice.
How we tested
To get WordPress stuck, we made the .maintenance files ourselves on 2 November 2026: one with the current time, one 601 seconds old and one built with time(). Each was deleted afterwards. The site ran WordPress 7.1.3 on Ubuntu 24.04, nginx 1.24.0 and PHP-FPM 8.3.6.
We also updated an active test plugin for real three times: with its folder unwritable, normally, and with the update stopped as soon as .maintenance appeared. WP-CLI 2.12.0’s maintenance-mode commands and a maintenance.php drop-in, with and without its own status code, were tried too. We didn’t test maintenance plugins, host panel switches or caches.