Fix WordPress Stuck in Maintenance Mode

Your site says “Briefly unavailable for scheduled maintenance” and it just won’t go away, even though you finished updating twenty minutes ago. I’ve hit this exact wall more times than I’d like to admit, usually right after a plugin update I thought would take ten seconds. So let’s get your site back up first, then talk about why WordPress does this to you.

Quick Answer

  • WordPress creates a .maintenance file in your site’s root folder during updates and doesn’t always delete it when the update finishes.
  • Deleting that file manually through FTP or your host’s file manager fixes it in under two minutes, in most cases.
  • If deleting it doesn’t stick, wrong file permissions or a stuck cron job are usually the real cause.
  • Some caching and security plugins recreate the file after you delete it, which is the part that trips people up.

Why WordPress Gets Stuck Like This

WordPress puts your site into maintenance mode automatically whenever it runs a core update, plugin update, or theme update. It creates a tiny file called .maintenance in your root directory, does its update work, then deletes the file when it’s done. That’s the whole mechanism. Simple, in theory.

But the deletion step is where things go wrong, and there are a few real reasons for it:

  • The update process got interrupted. A timeout, a lost connection, a server hiccup mid-update — any of these can leave the .maintenance file behind because the script never reached the line that removes it.
  • File permission conflicts. If your web server user doesn’t have write access to that file (or the folder it’s in), WordPress can create it but can’t clean it up afterward.
  • A plugin or theme update is silently failing. Sometimes it’s not a timeout at all — the update is actually erroring out in the background, and the maintenance file is just the visible symptom.
  • Low PHP memory limit or a strict max_execution_time. Shared hosting plans love to cap this low, and a larger plugin update just doesn’t finish in time.
  • Caching layers serving a stale maintenance page. Not 100% sure why some caching plugins are worse about this than others, but I’ve seen Cloudflare and a couple of popular WP cache plugins hold onto that page well after the actual file is gone.

And here’s the one people almost never think to check: a corrupted .maintenance file left over from a completely unrelated crash weeks earlier, sitting there dormant until the next update triggers WordPress to look for it again.

Where This Usually Happens

This isn’t one specific scenario — it shows up differently depending on setup:

  • Shared hosting with auto-updates enabled. Low resource limits mean updates time out more often here than anywhere else.
  • Sites with WP Engine, Cloudflare, or Sucuri in front of them. The edge cache keeps showing the maintenance screen even after the file is deleted server-side.
  • Multisite installs. One subsite update can trigger the maintenance screen network-wide, which is confusing if you’re not expecting it.
  • Local development environments (Local, XAMPP) after a bulk plugin update. File permission defaults on Windows in particular cause this a lot.

Technical Comparison: Common Causes vs Fixes

CauseTypical SymptomFix That Works
Update timed out mid-processSite frozen on maintenance screen for hoursDelete .maintenance file manually
Wrong file permissionsFile reappears or won’t delete via FTPReset permissions to 644, folder to 755
Caching/CDN serving old pageDeleted the file, page still showsPurge cache at host and CDN level
Silent plugin update failureMaintenance clears but site breaks afterCheck plugin error logs, roll back version

That table isn’t exhaustive — your host’s setup might not map cleanly onto any single row, and that’s normal.

Step-by-Step Fixes

Step 1: Connect to Your Site via FTP or File Manager

Use FileZilla, your host’s cPanel File Manager, or whatever SFTP client you’ve got. Navigate to your site’s root folder — the one with wp-config.php, wp-admin, and wp-content in it.

Step 2: Locate and Delete the .maintenance File

Look for a file named .maintenance. It’s hidden by default in most file managers, so you’ll need to enable “show hidden files” first. Delete it. That’s it — for most people, this alone fixes the problem immediately.

Step 3: Refresh Your Site (Hard Refresh)

Clear your browser cache or open an incognito window before checking. And if you’re still seeing the maintenance page after deleting the file, that’s almost always a caching issue, not a WordPress issue.

Step 4: Purge Any Caching Plugins or CDN

If you’re running Cloudflare, WP Rocket, LiteSpeed Cache, or similar, purge the cache from their dashboard too — not just WordPress’s own cache. This step gets skipped constantly and it’s probably the single biggest reason people think the fix “didn’t work.”

Step 5: Check File and Folder Permissions

If the .maintenance file keeps coming back or you can’t delete it at all, permissions are probably off. Root directory should be 755, and files inside it should generally sit at 644. Your host’s file manager usually has a “permissions” or “chmod” option when you right-click the file.

Step 6: Increase PHP Limits if Updates Keep Timing Out

If this keeps happening on every update, bump max_execution_time and memory_limit in your wp-config.php or php.ini, depending on what your host allows you to edit. So something like:

define('WP_MEMORY_LIMIT', '256M');

is a reasonable starting point for most shared hosting setups.

What Actually Worked For Me

Honestly, the first time this happened to me I panicked a little and started disabling plugins one by one through FTP, thinking it was a plugin conflict. It wasn’t. I spent maybe forty minutes on that before I even thought to check for a .maintenance file sitting in the root folder.

Deleted it, refreshed the page — still broken. Turned out my host’s server-level cache was holding onto the maintenance screen even though the actual file was gone. A quick cache purge through cPanel and the site came back instantly. So the lesson, at least for me, was that the file deletion is step one, not the whole fix — the caching layer is where this actually gets stuck for people running any kind of CDN or server cache.

Advanced Fixes and Edge Cases

Check Event Viewer / server error logs if you’re self-hosting. On a VPS or dedicated server, your Apache or Nginx error log (usually under /var/log/) will show you if PHP is timing out or throwing a memory error during the update, which tells you exactly which limit to raise.

Use WP-CLI to force-clear maintenance mode. If you have shell access, running:

wp maintenance-mode deactivate

is faster than digging through FTP, and it also tells you if WordPress itself thinks it’s still in maintenance mode versus a caching issue faking it.

Watch for database-level maintenance flags on multisite. In rare cases, a multisite network stores a maintenance flag in the wp_options table (maintenance_mode or similar, depending on plugin) that survives even after the file is deleted. You’ll need phpMyAdmin or Adminer to clear that manually.

Disable object caching temporarily. Redis or Memcached setups on managed hosting sometimes cache the maintenance response at the object level, and a normal cache purge button won’t reach it — you may need to restart the caching service itself.

Prevention Tips

  • Don’t run bulk plugin updates on shared hosting during high-traffic hours — timeouts are more likely under load.
  • Set your caching plugin’s cache lifetime lower on update days, or disable it temporarily before big updates.
  • Keep a staging site if your host offers one; test updates there first.
  • If updates keep timing out, that’s usually a resource limit problem worth raising with your host directly rather than something you can permanently fix on your end.

FAQ

Why does my WordPress site say “briefly unavailable” even after I deleted the .maintenance file? Almost always a caching issue — server-side, plugin-side, or CDN-side. Purge all three if one doesn’t work.

Is it safe to delete the .maintenance file manually? Yes. It’s just a flag file WordPress uses to know an update is in progress. Deleting it doesn’t touch your database or content.

Can this happen without me running any update? Rarely, but yes — a crashed cron job or a plugin that triggers update routines in the background can create the file without you doing anything manually.

How long should maintenance mode normally last? A few seconds to maybe a minute for most updates. Anything past five minutes usually means it’s stuck.

Will this break my site if I don’t fix it? No, your content and database are untouched. Visitors just can’t access the front end until you clear it.

Does this affect WooCommerce checkout pages too? Yes — maintenance mode blocks the entire front end, checkout included, so if you’re running a store this is worth fixing immediately rather than waiting.

Editor’s Opinion

honestly this one bugs me because the fix is so small but the panic it causes is real, especially if you’re running a store and every minute of downtime matters. the file deletion part is easy, everyone finds that on the first google search. the caching part is what actually gets missed and its usually the reason people think theyve tried everything and nothing works. check your cdn before you assume somethings seriously broken.

Leave a Comment