Stuck in WordPress Maintenance Mode? Here’s How to Get Out of It

Posted on March 31, 2016 by in Tips & Tricks | 7 comments

Stuck in WordPress Maintenance Mode? Here’s How to Get Out of It

WordPress maintenance mode is a feature WordPress core enables when you update to the latest version of WordPress or update plugins and themes. It displays a message across your site that lets users know you’re working on something so you can perform updates without forcing users to use a semi-broken site.

The update screen within WordPress typically reads “Enabling maintenance mode…” and “Disabling maintenance mode…” in its update sequence, but there are times, however rare, when this goes awry. If you’re racking your brain (and Google) trying to figure out how to fix this issue, you’ll be delighted to know it’s a lot easier than you think.

Let’s get started.

How Updates and WordPress Maintenance Mode Works

wordpress-updates
Updates play a vital role in the health of a system, and that goes beyond your WordPress site. Your operating system requires them. The applications you use on your desktop and mobile phone require them. Even your game consoles require them, but why are they so important?

The simple answer is security. Bugs occur, and new threats pop up every day. One sure way to ensure users are protected is by providing updates that feature security patches and new security features. However, updates are also used to provide new features for an application to improve its functionality.

What Happens Behind the Scenes When WordPress Performs Updates?

wordpress-update-process

Many hardcore WordPress users, including some of you, perform manual updates to prevent some of the issues that can occur during this process. If you’re experiencing this maintenance mode issue, you likely use the WordPress admin area to update WordPress, your themes, and your plugins.

If so, you likely don’t know what’s going on behind the scenes, in your root directory, while these updates take place. In a WordPress core update, for instance, new files are unzipped and copied over while old files are deleted. The process is quick, but if it goes wrong, it could make your site unusable.

WordPress has its updater create a .maintenance file in your root directory to combat this issue. The updater deletes this file before it completes its process so you never know the file ever existed on your site.

If you’re stuck in WordPress maintenance mode, your updater likely failed to delete this file, so you’ll need to delete it manually.

How to Delete the .maintenance File

delete-maintenance-file-cpanel

Deleting the .maintenance file can either be hard or easy depending on your level of experience in accessing your site’s file system. If you’re comfortable with this, all you need to do is access your site’s root directory, make hidden files viewable, and delete the .maintenance file.

If you’re using an FTP client, refresh it before testing your site. If you still see the maintenance mode message, test it on a different browser or clear your browser’s cache.

How to Delete the .maintenance File in cPanel

cpanel-show-hidden-files

cPanel is not the only file manager out there, but it is one of the most popular. If your host uses a different file manager and you’re not able to figure out how to use it using these cPanel instructions, contact your host for instructions on how to access your WordPress root directory.

If your host uses cPanel, log into it. Many file managers hide files that begin with a dot by default, so we need to make sure hidden files are showing. Once you’re logged into cPanel, scroll down to the files section, and click File Manager.

When the File Manager Directory Selection pop-up appears, select Web Root (public_html) and make sure Show Hidden Files is selected. Click Go. This takes you directly to where your .maintenance file is located. Find it, delete it, and refresh your browser with your site open to see if the message is gone.

If the pop-up does not appear when you click on File Manager and you do not see any dot files in your public_html directory, go back to cPanel, scroll down to the bottom, and click Reset All Interface Settings. Refresh the page, and try again. Try clearing your browser’s cache if it still doesn’t work.

How to Delete the .maintenance File Using FileZilla

delete-maintenance-file-filezilla

An FTP Client is a file manager you can use on your desktop. It comes with more features and permissions than the ones available through hosts more often than not. WordPress recommends using FileZilla for Windows systems and Cyberduck for Macs, though both of these programs have versions for both operating systems.

The following instructions are for FileZilla. Once you download the installer, run it and install the program on your computer, open it. Click File, and select Site Manager.

You’ll need to know your FTP details. Typically, this is the username and password you use to access your site’s file manager, but be sure to ask your host directly if you’re not sure.

Click New Site. Make sure the General tab is selected, and configure the following settings:

  • Host – Enter your domain. If your domain is example.com, enter example.com.
  • Port – Leave blank.
  • Protocol – FTP – File Transfer Protocol.
  • Encryption – Only use plain FTP.
  • Logon Type – Normal.
  • User – FTP username from your host.
  • Password – FTP password from your host.

Click over to the Transfer Settings tab. Tick the box for Limit Number of Simultaneous Connections, and enter 8 as the Maximum Number of Connections. This keeps the server from blocking your IP address, especially if you’re on a shared hosting server.

Click Connect. If you see folders named wp-content and wp-admin, you’re in the right place. If not, double click your root directory folder. This is typically public_html, but ask your host if you’re not sure.

If you do not see any dot files, click Server, and select Force Showing Hidden Files. Find the .maintenance file and delete it. Click the Refresh the File and Folder Lists button, and refresh your browser to check your site. Clear your cache and check again if you’re having issues.

What Causes WordPress Maintenance Mode Issues?

Image by Vitaliy Snitovets / shutterstock.com

Image by Vitaliy Snitovets / shutterstock.com

This issue has two main causes:

  1. You allowed update requests to pile up and attempted to update several things at once.
  2. The theme or plugin(s) you attempted to update is not compatible with your version of WordPress.

How to Prevent Update Issues

Theme and plugin updates can break a site, so updating things as soon as they’re available isn’t always recommended even though those updates likely contain valuable security patches. Before you perform an update, back up your entire WordPress site. Don’t trust your host to do it for you.

Performing regular backups and performing backups right before you update things will keep you protected enough to update things promptly rather than allowing them to pile up. You should also stop using the bulk update feature and update WordPress, plugins, and themes one by one.

Check out Nathan’s tips on running automatic WordPress updates. If you run a fairly basic WordPress site, you may benefit from them.

How to Prevent Compatibility Issues

New releases of WordPress versions are great, but they sometimes occur before developers have a chance to catch up. If a new WordPress version has come out recently, make sure the plugin or theme you wish to update is compatible with it. You can follow the developer’s email list, check their blog or ask them directly to stay up to date on this issue.

Similarly, if you’re on an older version of WordPress and only keep your plugins and theme up to date, you may start running into compatibility issues. It’s best to keep your site up to date by making sure you’re running the latest version of WordPress. This keeps your site more secure as well.

Issues with WordPress Maintenance Plugins

This is actually an entirely different issue, but it is related to some degree, making it worth a mention here. WordPress maintenance plugins allow you to put your site in maintenance mode so you can make minor and major changes to your site without expecting users to put up with them. The plugins allow you to use a custom maintenance page optimized for style and marketing purposes.

Unfortunately, some of these plugins fail to take your site out of maintenance mode after you request them to do so. Thankfully, the solution is simpler than deleting a file in your root directory. More often than not, all you need to do is empty the page cache if you’re using a caching plugin or deactivate/delete the plugin before emptying the cache. This should fix it quick.

Final Thoughts

Having a site stuck in maintenance mode can be an annoying issue, especially when you never intended to take your site down for maintenance in the first place, but at least the solution is an easy one. Still, that doesn’t necessarily mean you’re in the clear simply because you fixed it once.

The issue still occurred, and you need to take a few steps back to figure out what caused it so you can prevent something like this from happening in the future. The most important thing to do from here on out is make sure you’re updating WordPress, your theme, as well as your plugins regularly.

If you don’t think you can remember to check on your updates regularly, pick an “update day” for yourself and set a reminder once a week, bi-weekly, or once a month. On this day, you’ll log into your WordPress admin area, create a backup, and then update everything that needs to be updated one by one.

Check your site after each update. If there’s an issue, see if it’s fixable. If not, use your backup to roll your site back to when it was working properly and consider replacing the plugin that caused the issue.

Have you ever had this issue? Let us know how you solved it in the comments below, or at the very least, tell your worst update horror story!

Article thumbnail image by CatventureToons / shutterstock.com 

7 Comments

  1. Some times server may go down for a second or so, this can also cause this problem.

    Some times it occur when the images are turned off in your browser especially Firefox as I have once got this error.

  2. nice article thanks for sharing with us about WordPress maintenance.

  3. Great write up!

    A detailed guide on WordPress Maintenance.

    Thanks for these tips.

    I have bookmarked it, if in future I face this problem. I will surely look into this.

    Thanks a lot.

    Cheers!

    • I shared it with my friends and they found it very useful.

  4. yours idea is really good and innovative , these resources are really awesome thanks for sharing those information and i got more in formation about this concept.

  5. Hey Lyn, Great post, (of course). Thank you for sharing.

    When I’m stuck in WordPress maintenance mode, I manually delete the .maintenance file. Using FileZilla is the my favorite way.

437,821 Customers Are Already Building Amazing Websites With Divi. Join The Most Empowered WordPress Community On The Web

We offer a 30 Day Money Back Guarantee, so joining is Risk-Free!

Sign Up Today

Pin It on Pinterest