TRLet’s talk
← Argo Ajans

WordPress

How to fix WordPress stuck in maintenance mode

Ramazan Göksu ·

How to fix WordPress stuck in maintenance mode

Short answer

WordPress gets stuck in maintenance mode when a core, theme or plugin update is interrupted before it finishes: your site can stay locked behind “Briefly unavailable for scheduled maintenance” for hours. The cause is always the same: the .maintenance file WordPress creates during the update never got deleted.

Finding and removing that file usually takes under five minutes and carries no risk of data loss.

Why WordPress gets stuck in maintenance mode

When you start a core, theme or plugin update, WordPress temporarily locks the site so visitors never see a half-updated version. It does this by dropping a hidden file named .maintenance into the site’s root directory. Once the update finishes normally, WordPress deletes that file automatically and the site returns to normal instantly. According to WordPress’s own developer reference, this check simply looks for whether that file exists. As long as it’s there, the site is treated as being in maintenance mode.

The problem starts when the update is interrupted for any reason. The file stays in place, WordPress still assumes an update is “in progress,” and the only thing it shows visitors is that same maintenance message. The interruption itself usually comes from one of three sources. A PHP execution time limit on shared hosting can run out before the update package finishes downloading and unpacking; a browser tab can close or a connection can drop mid-update; or a second update can start at the same time as the first. Whatever the trigger, the result is identical: WordPress is stuck in maintenance mode and can’t clear itself.

Delete the .maintenance file via FTP or File Manager

The fastest, safest fix is deleting the .maintenance file directly. Connect with an FTP client (FileZilla, for example) or your hosting panel’s file manager and navigate to your site’s root directory. That’s the same folder where wp-config.php lives. The leading dot in the filename makes it a hidden file, so if “show hidden files” is turned off in your file manager, you won’t see .maintenance in the listing at all.

Once you find it, deleting it is the entire fix; there’s nothing to inspect or back up first, since WordPress recreates the file on the next update anyway. After deleting it, reload your site (clearing your browser cache if needed); the maintenance message should disappear immediately and the site should come back exactly as it was.

Can’t find the file? Show hidden files first

In cPanel’s File Manager, check “Show Hidden Files (dotfiles)” under Settings. In most FTP clients, the same option lives under a “Server” or “View” menu, usually labeled “Show hidden files.” Some hosts leave behind a differently timestamped variant of the file; if you see another dot-prefixed file in the root directory matching your update date, check that one too.

Still able to log into wp-admin? Try this first

In some cases maintenance mode only locks the front end, and you can still reach /wp-admin/. If that’s true for you, you don’t need to touch the file at all: go to Tools > Site Health, check the updates tab, and if an update is genuinely incomplete, finish it manually with “Update now.” Letting WordPress complete the update through its own admin flow is lower-risk than editing files directly, since WordPress removes the .maintenance file itself once the process actually finishes.

Turn off maintenance mode with WP-CLI

If you have command-line access to your server and WP-CLI installed, one command solves this:

Wp maintenance-mode deactivate

This removes the .maintenance file safely through WP-CLI and gets you the same result without touching FTP at all, a practical option on managed hosting environments or for teams running updates across several sites at once.

Why maintenance mode doesn’t clear itself

For WordPress to delete this file automatically, the update script has to run all the way to its final step; if the script gets cut off partway through, that cleanup step never fires. That’s why waiting it out rarely works, as long as the file sits there, WordPress runs the same check on every request and keeps returning the same message. The only real fix is removing the file by hand or re-triggering the update through WP-CLI or the admin panel so it can finish properly and clean up after itself.

Tell it apart from other WordPress errors

WordPress stuck in maintenance mode gets confused with the white screen of death or the “there has been a critical error on this website” message, but the three are distinct signals. A white screen is a genuinely blank, message-free page, pointing to a PHP error; the critical error message points to a plugin or theme conflict. Maintenance mode, by contrast, always shows the same familiar text (“Briefly unavailable for scheduled maintenance, check back in a minute”), and that consistency is actually good news, the message itself tells you exactly where the problem sits, without needing to open a debug log.

Getting this distinction right saves time. Deactivating plugins one by one, the right first move for a white screen or critical error, is unnecessary here, since the issue isn’t a code conflict but the mere presence of one file. The right diagnosis gets you to the right fix faster.

Restart the update safely

Once the file is gone, don’t leave without checking that your site is actually up to date. Go to your Updates screen and manually restart any core, theme or plugin update that didn’t finish; updating plugins one at a time rather than in a batch lowers the odds of hitting the same interruption again. If the update is a large one, particularly a core version jump, running it during a low-traffic hour also reduces the chance of hitting a PHP execution time limit.

Preventing this error next time

Getting stuck in maintenance mode is largely avoidable. Raising your PHP max_execution_time to a reasonable ceiling (120 to 300 seconds, say) from your hosting panel reduces the odds of a large update timing out. Running updates during low-traffic windows rather than peak hours means fewer visitors are affected if an interruption does happen. Keeping automatic background updates enabled, particularly for minor releases, reduces the chance of a manual update colliding with one running in the background. For major version jumps, testing on a staging environment first remains the safer path. Taking a fresh backup before a large core update won’t prevent this specific error, but it shortens recovery time to minutes if the update goes wrong in some other way. Our guide to the WordPress white screen of death covers a related family of these errors in more depth. All three trace back to the same root: an update that never finished cleanly.

When you need your host’s support

If you’ve deleted the .maintenance file and the site still won’t load, or the update keeps failing at the exact same point every time you retry, the cause has moved past the file itself: it’s more likely a hosting resource limit (a disk quota, a memory cap) or a server-side outage. This mirrors the server-side scenarios we cover in our guide to the WordPress database connection error. At that point, clearly telling your hosting provider’s support team which update you were running and the exact error text lets them check something you can’t see from your own panel.

Next step

WordPress stuck in maintenance mode looks more alarming than it is, in most cases it’s solved by finding and deleting a single file, in minutes, with no risk to your data. If the problem keeps recurring on the server side, or your update process needs to be more resilient as your site grows, our group company Web Tasarım Ofisi supports WordPress builds, maintenance and technical troubleshooting.

To talk through your site’s technical setup or a custom software need, take a look at our custom software service or get in touch with Argo Ajans.

Frequently asked questions

What does it mean when WordPress is stuck in maintenance mode?

It means a core, theme or plugin update didn't finish, and the .maintenance file WordPress creates during updates never got removed from the site's root folder. As long as that file exists, WordPress treats the site as locked and keeps showing visitors "Briefly unavailable for scheduled maintenance."

Does this error cause data loss?

No. Maintenance mode is only a display lock; it doesn't touch your database or files. Once you delete the .maintenance file, the site returns to whatever state the update left it in; nothing is lost.

Where do I find the .maintenance file?

In your site's root directory, the same folder that holds wp-config.php. Its name starts with a dot, which makes it a hidden file, so you'll need to enable "show hidden files" in your FTP client or hosting file manager to see it.

How do I turn off maintenance mode with WP-CLI?

If you have command-line access and WP-CLI installed, run `wp maintenance-mode deactivate`. It removes the .maintenance file safely without needing FTP access at all.

What if WordPress keeps getting stuck in maintenance mode on every update?

Update plugins one at a time during low-traffic hours, and check your hosting panel's PHP max_execution_time limit. If the error keeps recurring at the same point after you delete the file each time, the cause has moved from the file itself to a server resource limit, and it's time to involve your host's support team.

Need help with this?

Custom Software

Explore the serviceGet in touch
Good work starts with a conversation.

Let’s make
it matter.

Izmir office
Tariş Cd. (1497. Sok.) No. 5C Ofis P22
35230 Alsancak, İzmir, Türkiye
UK office
167 Sheen Lane
SW14 8NA London, United Kingdom
Kayseri office
Sahabiye Mh. Buyurkan Sok. No.29
38015 Kocasinan, Kayseri, Türkiye
Send your project brief