←back to Blog

WordPress stuck in maintenance mode: how to fix the "briefly unavailable for scheduled maintenance" message

WordPress Stuck in Maintenance Mode? Here’s How to Fix It

You click “Update” on a plugin, the progress spinner stalls, and now every visitor sees the same plain line of text: “Briefly unavailable for scheduled maintenance. Check back in a minute.” A minute passes. Then ten. When WordPress is stuck in maintenance mode, the good news is that the fix usually takes less than two minutes, and nothing on your site is actually lost.

The bad news is that most guides stop at “delete the .maintenance file” and never explain why the message sometimes survives that fix. This guide covers both: the quick fix, and what to check when the quick fix doesn’t work.

Why Is My WordPress Site Stuck in Maintenance Mode?

A WordPress site gets stuck in maintenance mode when an update starts but never finishes cleanly. WordPress creates a temporary file called .maintenance in the site’s root folder at the start of every core, plugin, or theme update, and deletes it when the update completes. If the update is interrupted, that file stays behind and WordPress keeps showing the maintenance message.

The .maintenance file is tiny. It contains one line of PHP that stores the time the update started:

<?php $upgrading = 1790000000; ?>

Common reasons an update gets interrupted:

  • Closing the browser tab mid-update. Dashboard updates run through your browser session. Close the tab too early and the process can die halfway.
  • Bulk-updating a dozen plugins at once. Every extra plugin in the queue is another chance for a timeout on slower hosting.
  • PHP timeouts or memory limits. Cheap shared hosting often kills long-running scripts before a large update finishes.
  • Low disk space. WordPress needs room to download and unzip the new version before swapping it in.
  • A compatibility crash. A plugin update that needs a newer PHP or WordPress version can fatal-error during the upgrade.

How to Fix WordPress Stuck in Maintenance Mode (Delete the .maintenance File)

To fix WordPress stuck in maintenance mode, delete the .maintenance file from the site’s root folder, the same folder that holds wp-config.php, wp-admin, and wp-content. Then clear your cache and reload the site. In most cases the site comes back immediately.

Option 1: cPanel File Manager

  1. Log in to cPanel and open File Manager.
  2. Click Settings (top right) and tick Show Hidden Files (dotfiles). The .maintenance file starts with a dot, so it’s hidden by default.
  3. Open your WordPress root folder, usually public_html.
  4. Right-click .maintenance and choose Delete.

Option 2: FTP or SFTP

Connect with an FTP client such as FileZilla, open the WordPress root folder, and delete .maintenance. In FileZilla, hidden files are shown through Server > Force showing hidden files if the file doesn’t appear.

Option 3: WP-CLI

With SSH access, WP-CLI handles it in one command. The official wp maintenance-mode command can check the status and switch maintenance mode off:

wp maintenance-mode status
wp maintenance-mode deactivate

Deleting the file directly with rm .maintenance from the WordPress root works too. WP-CLI is simply the cleaner option because it confirms the result.

Which Method Should You Use?

MethodWhat You NeedBest ForSpeed
cPanel File ManagerHosting control panel loginMost shared hosting usersAbout 1 minute
FTP / SFTPFTP credentials and a client like FileZillaHosts without cPanel2 to 3 minutes
WP-CLISSH accessVPS, managed hosting, developersSeconds
Wait it outNothingWhen you have no server access at allUp to 10 minutes, if cache isn’t involved

Doesn’t WordPress Exit Maintenance Mode on Its Own?

Yes. WordPress core ignores a .maintenance file once its timestamp is more than 10 minutes old, according to the wp_is_maintenance_mode() reference on Developer.WordPress.org. So if the maintenance message is still showing well after 10 minutes, the leftover file probably isn’t the only problem.

This detail is the one most tutorials skip, and it’s the most useful clue you have. A site still showing “Briefly unavailable for scheduled maintenance” an hour later is almost always one of these:

  • A cached copy of the maintenance page. A page cache plugin, server cache, or CDN like Cloudflare saved the maintenance screen and keeps serving it. Purge every cache layer, then test in a private window.
  • A maintenance mode plugin, not WordPress core. Plugins like SeedProd or WP Maintenance Mode show their own “coming soon” or maintenance screens, which have nothing to do with the .maintenance file. Switch the plugin’s mode off in its settings, or rename its folder in wp-content/plugins.
  • A manually created file using time(). If a script or developer wrote $upgrading = time(); instead of a fixed timestamp, the file never expires and has to be deleted by hand.

What to Check After You Delete the .maintenance File

Deleting the .maintenance file only removes the message. It doesn’t finish the update that crashed. After the site loads again, confirm the interrupted update actually completed, because a half-installed plugin or theme can break the site in quieter ways.

Check the Plugins Screen

Go to Plugins in wp-admin and look at the plugin that was updating. If it shows as deactivated, missing, or still asks for an update, run that single update again. If the plugin folder is corrupted, delete it and reinstall a fresh copy from WordPress.org or the vendor.

White Screen or Critical Error After the Fix

A blank page or “There has been a critical error on this website” after removing the maintenance file means the interrupted update left broken code behind. Rename the affected plugin’s folder over FTP to deactivate it, then follow a proper process for finding which WordPress plugin is causing the problem. If the page is fully blank, the WordPress white screen of death guide walks through the recovery steps without needing admin access.

“Another Update Is Currently in Progress”

A failed WordPress core update can leave a lock behind that blocks the next attempt with the message “Another update is currently in progress.” WordPress stores this lock as an option named core_updater.lock, and it clears itself after about 15 minutes. To clear it immediately with WP-CLI:

wp option delete core_updater.lock

Without WP-CLI, the same row can be deleted from the wp_options table in phpMyAdmin. Take a database backup before touching phpMyAdmin.

How to Stop WordPress Getting Stuck in Maintenance Mode Again

The best way to prevent WordPress getting stuck in maintenance mode is to update plugins one or two at a time, keep the browser tab open until every update finishes, and test big updates on a staging copy first. Most stuck updates come from rushed bulk updates on underpowered hosting, not from WordPress itself.

  • Stop bulk-updating everything. Selecting all 25 plugins and clicking “Update” is the single fastest way to trigger this problem on shared hosting.
  • Test on staging first. Major plugin, theme, and core updates belong on a WordPress staging site before they touch the live site.
  • Back up before updating. A recent backup turns a failed update from an emergency into a five-minute restore. The best WordPress backup plugin options can run automatically before updates.
  • Check compatibility. The update screen shows whether a plugin has been tested with your WordPress version. An untested plugin on an old PHP version is a risk worth pausing on.
  • Give PHP some headroom. Very low memory limits and 30-second execution limits make timeouts more likely on large updates. Ask your host to raise them if updates regularly stall.

Can You Customize the WordPress Maintenance Mode Page?

Yes. WordPress uses a custom maintenance screen if a file named maintenance.php exists in the wp-content folder. That file replaces the default plain-text message with your own HTML, so visitors see a branded page during updates instead of an unstyled line of text.

Keep the custom page simple. It loads before WordPress is fully running, so theme functions, plugins, and database calls aren’t available. Plain HTML and inline CSS are the safe choice. Sending a 503 status code with a Retry-After header also tells search engines the downtime is temporary:

<?php
http_response_code( 503 );
header( 'Retry-After: 600' );
?>
<!DOCTYPE html>
<html>
<head><meta charset="utf-8"><title>Back in a few minutes</title></head>
<body style="font-family:sans-serif;text-align:center;padding:80px 20px;">
  <h1>We're updating the site</h1>
  <p>Everything will be back in a few minutes.</p>
</body>
</html>

The Bottom Line

WordPress stuck in maintenance mode looks scary, but it’s one leftover file. Delete .maintenance from the root folder, purge every cache, and check that the interrupted update actually finished. If the message outlives the 10-minute window, look at your cache or a maintenance plugin before anything else. And if the site throws a different error after the fix, the WordPress 500 internal server error guide is the next place to look.

Frequently Asked Questions

Delete the hidden .maintenance file from your WordPress root folder using cPanel File Manager, FTP, or the WP-CLI command wp maintenance-mode deactivate. Then clear your site and CDN cache and reload the page.

The .maintenance file starts with a dot, which makes it a hidden file on Linux servers. Enable “Show Hidden Files (dotfiles)” in cPanel File Manager settings, or “Force showing hidden files” in FileZilla, to make it visible.

Yes, deleting the .maintenance file is safe. It is a temporary flag file that WordPress creates during updates and normally deletes itself, so removing it does not affect your content, settings, or database.

A normal WordPress update keeps the site in maintenance mode for only a few seconds. If an update fails, WordPress core ignores the leftover .maintenance file after 10 minutes, so a message that lasts longer usually comes from a cached page or a maintenance mode plugin.

A short maintenance window does not hurt SEO, because WordPress returns a 503 “service unavailable” status that tells search engines the downtime is temporary. Problems only start if the site stays down for days, or if a cache serves the maintenance page with a normal 200 status.

Leave a Reply

Your email address will not be published. Required fields are marked *