Fix Unavailable For Scheduled Maintenance Error In WordPress

Written by Dan Anderton

WordPress stuck in maintenance mode fix

Whenever you perform an update to the WordPress core, a plugin or theme on your WordPress site, your site will go into maintenance mode. Every now and again, your site can get stuck in this state. All you’ll be seeing is the message ‘Unavailable for scheduled maintenance’, every time you try to load your site. Technically, this isn’t an error… it’s more of a notification.

This ‘error’ is caused by your WordPress site failing to complete an update, leaving it stuck in ‘maintenance mode’. So I’m going to show you how you can quickly, and easily fix this error. I’ll also show you why this happens and give you some tips on avoiding it in the future.

Why Does WordPress Get Stuck in Maintenance Mode?

Once you click the ‘update’ button next to a plugin, theme or start a core update, WordPress immediately begins to download the necessary update files to your server. Once it has these files, it’ll start trying to install the updates. Before it does this, it puts the site into maintenance mode, displaying the message ‘Briefly unavailable for scheduled maintenance. Check back in a few minutes’ message.

To make this happen, WordPress creates a temporary file in your website’s root directory called .maintenance. When working properly, the maintenance message will be displayed for a few seconds before WordPress deletes the file and restores your site back to normal.

Sometimes while this process is taking place, the update script can timeout. This can be caused by a slow server response, low memory issues or various other things.  When this script times out, WordPress doesn’t get a chance to take your site out of maintenance mode.  This results in the file left on the server, and the site appearing stuck in maintenance mode.

How To Fix Maintenance Mode

The good news is, this is really simple to fix. To solve the problem, all you need to do is delete the .maintenance file from your website’s root directory using an FTP client or your hosting control panels file browser.

If you can’t find the file, make sure your FTP client is set to show hidden files. In Filezilla, this can be done by clicking on Server > Force showing hidden files. In the cPanel file viewer, you can do this by going to File Manager > Settings and ticking the box next to ‘Show Hidden Files (dotfiles)’.

Once you’ve deleted the .maintenance file, your site will come out of maintenance mode., fixing the error.

Avoiding WordPress The Problem

The easiest way to avoid this issue in the future is by upgrading your hosting. More memory will usually allow the script to fully complete, avoiding the issue entirely. If upgrading is not an option for you, then my recommendation would be to perform updates individually. Avoid hitting the ‘update all’. Update each plugin individually, waiting for the update to complete before moving on to the next one.

If you don’t have time to worry about updating your plugins and maintenance mode, then perhaps you should check out our WordPress care packages. We’ll take care of all your future update needs as well as security and so much more.

About The Author

Dan is one of the founders of EZPZ WP. He has over 12 years of experience in working on WordPress websites as both a developer and support specialist. He also works freelance as an SEO Specialist and website designer. Dan is certified under the Cisco CCNA® programme as well as being Google AdWords and Analytics certified.

Deprecated: File Theme without comments.php is deprecated since version 3.0.0 with no alternative available. Please include a comments.php template in your theme. in /home/ezpzwpne/public_html/blog/wp-includes/functions.php on line 5581

Leave a Reply

Your email address will not be published.