Getting WordPress out of maintenance mode
How to fix a WordPress site stuck showing "Briefly unavailable for scheduled maintenance" by deleting the .maintenance file, completing interrupted updates and clearing caches.
If your WordPress site is showing "Briefly unavailable for scheduled maintenance. Check back in a minute." and it's been more than a few minutes, something has gone wrong with an update.
When WordPress updates itself, a theme or a plugin, it creates a temporary file called .maintenance in your WordPress root folder. While that file is there, WordPress shows the maintenance message instead of your site, and sends visitors and search engines a 503 "Service Unavailable" response.1 WordPress normally deletes the file as soon as the update finishes.
If the update is interrupted (by a server timeout, an error, running out of memory or a lost connection), the file can be left behind. WordPress has a safety net for this: it stops treating the site as in maintenance 10 minutes after the update started, even if the file is still there.1 So if the message has been showing for longer than that, it's usually being served from a cache, a maintenance plugin or a custom maintenance page, rather than by WordPress itself. The steps below cover all of these.
If you're seeing a 503 error without this message, the cause is different, and our guide to fixing 502, 503 and 504 errors covers it.
Delete the .maintenance file
Connect to your site via SFTP or your hosting file manager and go to your WordPress root folder. This is the folder that contains wp-config.php, wp-content and wp-admin, often called public_html, www or htdocs.
Look for a file named .maintenance and delete it. It's only a temporary marker, so deleting it is safe. Then refresh your site.
If you can't see the file, your file manager or SFTP client is probably hiding files whose names start with a dot. Look for a "show hidden files" option in its settings.
If you have SSH access, you can delete it from the command line. Double-check the path before running it:
rm /path/to/your/wordpress/.maintenance
Clear all caches
If you have page caching (from a caching plugin, your host or a CDN), the maintenance page may have been cached and kept being served long after the update ended. This is one of the most common reasons the message lingers.
Clear your caching plugin's cache and your host's server cache, and purge your CDN cache if you use one. Then check your site in a private or incognito window. Our guide to a WordPress site not updating walks through each caching layer.
Check whether something else is showing the message
If there's no .maintenance file and clearing caches hasn't helped, the message is coming from somewhere else.
- A maintenance mode or "coming soon" plugin may be switched on. Check its settings, or deactivate it by renaming its folder in
wp-content/plugins/if you can't reach the dashboard. - A custom maintenance page. If a file called
maintenance.phpexists in yourwp-contentfolder, WordPress uses it instead of its standard message during updates.1 Some hosts and plugins add one. - Your hosting provider may have put the site into maintenance or suspended it at server level, which can look similar but isn't controlled by WordPress. Check your hosting control panel for notices, and contact their support if you think this is the case.
Finish any interrupted updates
Once the site is back, go to Dashboard → Updates and check whether any plugins, themes or WordPress itself still show updates as available. An interrupted update can leave files half-updated, which can cause errors even after the maintenance message has gone.
If an update is still listed for something you thought had already updated, take a backup and run the update again. If it keeps failing, you can install a fresh copy of the plugin or theme from its official source. WordPress's Upload Plugin and Upload Theme screens will offer to replace the existing version, or you can upload it via SFTP to wp-content/plugins/ or wp-content/themes/. If the site breaks after the update completes, see our guide to recovering a site broken by an update.
For an interrupted WordPress core update, take a backup, then go to Dashboard → Updates and click the Re-install version button to replace WordPress's core files with a clean copy.2
If maintenance mode keeps coming back
If the site gets stuck every time you run a particular update, that plugin or theme may be causing the update itself to fail. Check whether a newer version is available, check the server's PHP error log for errors at the time of the update (your host can help with this) and contact the plugin or theme developer.
If you need to temporarily switch a plugin off to get the site working, rename its folder in wp-content/plugins/ (for example, from plugin-name to plugin-name-disabled). This switches its features off for visitors too, so rename it back once the problem is fixed and check it's active again under Plugins.
Need help getting out of maintenance mode?
If the site stays in maintenance mode after these steps, or the interrupted update has left your site broken, my WordPress development service and emergency WordPress support can help get it back online. Your hosting provider may also be able to help, particularly if the problem is at server level.
load.php (wp_maintenance and wp_is_maintenance_mode), WordPress source code on GitHub. ↩ ↩ ↩
update-core.php, WordPress source code on GitHub. ↩