WordPress Stuck in Maintenance Mode After Failed Theme Upgrade

When I logged into my WordPress Dashboard yesterday it notified me that three of my themes had updates that needed to be installed. I don’t always run off and install every theme upgrade immediately but it’s a good idea to stay current with the latest updates because the longer you hold off on upgrading the more you are putting yourself at risk by not installing patches for recent exploits.

With modern day WordPress everything is one-click: one-click install, one-click update, one-click [insert time consuming task made simple here], and theme upgrades are no exception. WordPress gave me the option to upgrade all three themes at once and I obliged. However, upon performing the upgrades my blog was put into a state of perpetual maintenance. Any page that I tried to visit whether in the admin panel or on the public site would only give me a screen which resembled the following:

WordPress stuck in maintenance mode

After a quick Google search I found the fix on a thread in the WordPress support forum. It turns out that when WordPress puts your blog in maintenance mode it places a “.maintenance” file in the root directory of your installation. (For illustrative purposes I’ve re-uploaded the file in a folder other than my root installation path)

WP-Maintenance-FTP-Filezilla

The .maintenance file is just a simple one-liner of php which looks like:

1
<?php $upgrading = 1234567890; ?>

To fix this simply delete the .maintenance file or remove it from the WordPress root directory. After doing so you should be able to refresh and be back to normal. Note that the first time I refreshed my index.php after this occurred I got a few PHP errors at the top of the page, but it only happened that one time.

I hope this information helps someone in a time of need as it did me. As always feel free to drop me a question or comment below.

Cheers

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>