Freeing a site stuck in maintenance mode


The WordPress “update” function is one of its strongest features, downloading and swapping in updated Themes, Plugins, even components of WordPress itself, all with a single click.

When it works, that is.

In order to perform this update, the function temporarily puts the site into “maintenance mode”, during which all site functionality — including admin functionality — is suspended and a simple text message is displayed.

Depending on the size of the component being updated and the speed of the connection, this usually only takes a couple of seconds, a minute at the most, then the site’s back up and nobody’s the wiser.

And if something goes wrong during this update process, your site remains in maintenance mode. Suddenly that simple text message is all anyone can see, including you, the admin.

Okay, enough drama. How do I fix it?

  1. SSH to the web host. (You can also connect via SFTP but make sure that hidden files — i.e. those that begin with a dot, like .htaccess — are visible.)
  2. Navigate to the WordPress root. If you have WordPress installed within a subdirectory, navigate to that subdirectory.
  3. Look for — and delete — a file named .maintenance.
  4. Dump your browser’s cache and reload the site.
  5. Still stuck? Navigate to wp-content/upgrades/ and delete any directories inside, then dump your browser’s cache and try loading it again.

If you have to perform this last step, you may then need to delete and reinstall the plugin or theme that was only partially updated. You’ll see an error indicating if you do.