WordPress stuck in maintenance mode usually means an update failed mid-flight. This guide covers a safe way to clear the flag and what to check so it doesn’t happen again.
Safety first
- Snapshot the VM if you can
- At minimum, copy the site root (or at least the
.maintenancefile) before removing anything
Fix pattern
- Remove the maintenance flag file (usually
.maintenancein the site root) - Re-run the failed update or roll back the plugin/theme
Root cause checks
- Permissions or ownership prevented file writes
- Disk full blocked extraction
- Timeout during plugin or theme download
FAQ
Where is the maintenance file?
In the WordPress root (same directory as wp-config.php), named .maintenance. Remove it only after you’ve addressed the cause (e.g. disk, permissions, timeouts) so the next update can complete.
Updates keep failing halfway.
Check PHP timeouts and WordPress updates and increase limits where appropriate. Also verify disk space and permissions.
Related
- Fixing WordPress uploads and updates with correct permissions — permissions issues
- WordPress 500 errors: fast triage — when the site is down
- Fix a full root disk on Ubuntu WordPress servers — disk-full recovery
- PHP timeouts and failed WordPress updates — timeout causes