Joswig Solutions

IT Provider for Your Digital Business

[Solved] WordPress Stuck in Maintenance Mode

briefly unavailable for scheduled maintenance

WordPress stuck in maintenance mode?

The maintenance mode on a WordPress website is activated when you are trying to update a plugin or a theme or the WordPress core. 

An update typically lasts for a few seconds. As soon as it is over, the maintenance mode is disabled and your website is back to normal. 

Occasionally, updates go wrong for causes like compatibility issues, and server failure, among other things. 

When updates go wrong, that’s when the site becomes stuck in maintenance mode. 

In this article, we are going to show you how to fix a site stuck in maintenance mode and how to ensure that in the future your site never gets stuck in the maintenance mode.

What Causes the Site to be Stuck in Maintenance Mode

Maintenance mode is a native WordPress feature that activates when you are trying to update a plugin, theme, or the core. 

During an update, WordPress generates a .maintenance file that activates the maintenance mode. And people who visit your site during the update are shown this message: Briefly unavailable for scheduled maintenance. Check back in a minute.

briefly unavailable for scheduled maintenance

After the update is over, the .maintenance file is removed and the maintenance mode is automatically disabled. 

The update takes only a couple of seconds to run. You wouldn’t even know that your site was in maintenance mode. 

But occasionally updates can go wrong which is when your website becomes stuck in maintenance mode. Possible causes include:

  • Compatibility issues between the plugin, theme, and the WordPress core.
  • Accidentally closing the browser while updates are running on your site. 
  • Running too many updates at the same time.

Now that you know why your website is stuck in maintenance mode, we will show you how to disable it and get your website up and running.

How to Fix WordPress Stuck in Maintenance Mode

There are two ways to fix this problem. First, you need to delete the .maintenance mode file, and then if the problem persists, you need to find the culprit plugin or theme and remove it from your site. 

Before you start, take a backup of your website. In the following tutorial, you will need to access the backend of your website and make modifications to your WordPress files. This is risky business. A single mistake can break your website. If you have a backup, you can get your website up and running in no time. 

Now, let’s dive into the tutorial. 

Step 1: Clear Browser Cache

You might not know about this but caching is a process where the browser downloads the current version of a page and shows it to you whenever you try accessing the page. 

Caching ensures a better user experience but in some cases, it prevents the users from accessing the latest information. 

For instance, the maintenance mode of your website may have been disabled already but you are seeing the cached version of your site where the maintenance mode persists. 

Removing the browser cache will make it clear if your site is still stuck in maintenance mode or if it’s back to normal.

Step 2: Delete .maintenance File

To delete .maintenance file, you need to log into your hosting account. 

Then go to cPanel and open the File Manager.

Next, go to the public_html folder and look for the .maintenance file within that folder. Right-click and select the Delete button. 

delete maintenance file file manager

Some hosting providers don’t offer access to the cPanel. In that case, you need to use an FTP client. 

Connect your site’s server with an FTP client using this guide. As soon as the connection is established, you will get access to the File Manager. Next, all you need to do is go to the public_html folder, find the .maintenance file and delete it. 

delete maintenance file filezilla

The maintenance mode should be now disabled from your WordPress website. If it still persists, then you need to find the culprit theme or plugin and remove it from your site. 

Step 3: Disable Plugins & Themes

When your site is stuck in maintenance mode, you can’t log into your WordPress website. This means you can’t deactivate the plugins and themes from your dashboard. 

Don’t worry. There’s another way to access and deactivate the plugins and themes installed on your site. 

Open your hosting account and your FTP client and select the public_html folder. Inside that folder, you will find another folder called the wp-content. This one contains the plugins and the themes folders. All the plugins and themes installed on your site are located in these folders.

plugins and themes folder in wp-content

Right-click on the plugins folder and rename it into old-plugins. This will disable all the plugins on your site. 

Open your website and check if the maintenance mode has been disabled. If it has, then rename the folder back to its original name

Next, open the plugins folder and start disabling the plugins one by one by renaming them. Every time you disable a plugin, check your site to see if the maintenance mode has been removed. 

If plugins are not the culprit then disable the themes installed on your site using the same method. 

Once you find the culprit plugin or theme, delete it by right-clicking on the folder and selecting the Delete option.

Step 4: Reindex Site 

After disabling the maintenance mode, Google your site. You may find that Google is showing that your site is still under maintenance. 

In that case, request a reindex of your site. It will force Google to crawl the website. After Google learns that your website is back to normal, it will stop showing your site as under maintenance mode.

How to Prevent Site From Being Stuck in Maintenance Mode

Getting your website out of maintenance mode is only half that battle. You need to ensure that your site never gets stuck in maintenance mode in the future. Here’s how:

i. Take a Backup Before Running Updates

Every time you run updates, take a backup of your entire website. If an update goes wrong, simply restore the backup and your website will be back to normal.

This is a temporary solution. The maintenance mode error was caused by an outdated plugin or theme or the WordPress core. 

But you can’t delay updates forever. 

Updates are an essential part of website management. Updates help implement new features, patch security holes and improve the performance of the software. 

So while backups can offer a temporary solution, you need a better solution. You need to use a staging site. More on this in the next section.

ii. Use Staging Site to Run Updates 

Staging sites are a replica of your live site. You can use the staging site to figure out which plugin or theme is causing the maintenance mode error on your live site. 

Update the plugins and themes one by one and keep checking your site to see if the maintenance mode has been disabled. 

This way, your live site will remain unharmed.

An alternate way to use the staging site is by running the updates on the staging site instead of the live site. If things go right, you can simply merge the updated staging site to the live site. If things go wrong, you can look into the problem and find a solution without affecting your live site.

iii. Check For Compatibility Issues

Before updating any of your plugins or themes make sure they are compatible with the version of WordPress installed on your site. 

To check whether the latest version of the plugin or theme is compatible with your WordPress version, go to your plugins page. On every outdated plugin, you will find the option to view version details. Select that and a popup will appear.

view version details plugins - WordPress stuck in maintenance mode

 The popup contains information on whether the plugin is compatible with your WordPress version or not. 

plugin compatibility check - WordPress stuck in maintenance mode

Some plugins will be marked as not tested with your current WordPress version. In such cases, it’s best to delay the update for a couple of days.

plugin incompatible with wordpress version - WordPress stuck in maintenance mode

iv. Avoid Bulk Updates

Updating too many plugins and themes together puts a lot of pressure on your server. This can cause the server to snap and updates can get stalled. 

It’s better to run updates in small batches. We recommend setting some time aside on a weekly basis to run updates on your WordPress site.

Final Thoughts on WordPress Stuck in Maintenance Mode

Updates are an important part of managing a WordPress website. But running updates can lead to problems such as your website may breaking or it may be stuck in maintenance mode forever. 

To fix a website stuck in the maintenance mode, you need to go to the backend of the site and delete the .maintenance file. If that fails, you need to find the culprit plugin or theme and remove it from your website. 

For future updates, take a backup beforehand so that when updates go wrong, you can restore the backup to get your website up and running in no time. Alternately, you can use a staging site to test updates before making them on the live site. 

That’s it for this one folks! 

If you have any questions about ‘WordPress stuck in maintenance mode,’ leave us a comment below. 

Leave a Reply

Your email address will not be published.