In today's tutorial, we will show you some quick tips to help you get out of the WordPress maintenance mode if your website gets stuck in it.
Regular updating WordPress core files, plugins, and themes are essential to speeding up your website's performance. And in most cases, the WordPress maintenance process is pretty swift and seamless. But sometimes the procedure gets interrupted midway, leaving your website idle for an indefinite period.
So, how do you resolve the issue?
Fortunately, the fix for this is pretty easy, and you can easily pull your website out of the glitch by following a few simple steps. In this guide, we will cover:
So without further ado, let's dive in!
What Causes Your WordPress Site to Get Stuck in the Maintenance Mode?
Whenever you make changes to your website, WordPress automatically puts it into maintenance mode. Any user who tries to access the website during this phase sees a message addressing your website's unavailability.
As we mentioned above, the update process is straightforward and hardly takes a few seconds from your website's time on the internet. But the situation gets complicated when WordPress fails to ‘switch back' to its live status causing your site to remain unavailable for the visitors on the World Wide Web.
Some possible reasons for the technical problem include:
- You closed the browser during the middle of an update
- You are updating several themes and plugins at the same time
- Your themes and plugins are not compatible with the WordPress version
Regardless of the reason, here are a few simple fixes to resolve the issue without compromising your website.
Fix #1 – Delete the .maintenance file
In most cases, the .maintenance file continues to exist in your site's root folder, causing the maintenance mode to freeze. Simply deleting the file via the cPanel in your File Manager or accessing the server through an FTP client like FileZilla will do the trick.
Follow the steps below to delete the file through cPanel:
- Connect to your cPanel and find the file named as .maintenance;
- Often the files with a dot (.) in the prefix are hidden by default, so make sure to check the Show Hidden Files in the Settings toolbar;
- Once you locate the desired file, delete it and find your website functioning as normal;
- We also suggest clearing the cache of your WordPress site;
In case you are unable to find the .maintenance file in your root directory, chances are you have deleted it, or the update has been completed successfully.
Deleting the .maintenance file through FileZilla:
Many WordPress users prefer to use a file manager like FileZilla as it comes with more features than the traditional ones offered by the host service. To delete the .maintenance file located in FileZilla:
- Open FileZilla;
- If you already entered your SFTP connection data in the FileZilla Server Manager, open this by going to File à Server Manager à Connect;
- You can also manually enter the same data by going to Server, enter the IONOS FTP server, then your SFTP username and password. Enter the 22 for the port and click Connect;
- Open the folder /path-to-their-wordpress-website/;
- Locate the .maintenance file and delete;
- Click on Server and select Force Show Hidden Files if you are unable to locate the required .maintenance file;
- Refresh the list of Files and Folders along with your browser to check if the problem is solved;
- Clear the cache as well!
Fix #2 – Modify the Themes and Plugins
Sometimes the maintenance mode error can be caused by a problem in the theme or plugin you recently added, modified, or updated.
To check if the plugins or themes is the culprit:
- Access the root folder via SFTP;
- Open the folder path-to-your-wordpress-website/wp-content/Under wp-content you will find the plugins folder;
- Change the name from plugins to something else, such as plugins-old;
- Refresh to check if the website is running as normal;
- If trouble persists, follow the same protocol with the themes folder.
By now, you would probably know whether themes or plugins are causing the issue. Login to the FTP server and revert the initial changes you made to the name of the plugins and themes folder – rename back to ‘plugins' and ‘themes,' respectively.
- Go to the WordPress Admin Page;
- Then Appearance and themes or plugins – depending on the one that is at fault;
- Activate the plugins one step at a time and continue refreshing the page with each plugin to determine the one causing the problem;
- Delete the faulty plugin once you can identify it;
- Reinstall the plugin once the issue is fully resolved.
Alternatively, if you have a faulty theme, deactivate the current one and choose any default theme. Yes, you may find your site's design to appear out of place, but you can always reinstall the theme by following our step-by-step guide.
Expert's Tip: Rerun the upgrade to make sure your site is running on the latest version of WordPress.
How to Prevent WordPress from Getting Stuck in Maintenance Mode?
The WordPress stuck in maintenance mode is an issue that happens to the best of us on a periodic basis. And thanks to the user-friendliness of the free website builder, the problem is easily solvable with some simple fixes.
However, taking a few protective steps to minimize the error's likelihood will definitely help your sanity. Some preventive measures include:
Change your WordPress hosting plan
Often the maintenance mode error occurs due to a slow server response or memory issue with your hosting provider. Try upgrading your WordPress website to a higher hosting plan to reduce the occurrence of this issue.
Ensure Plugins and Themes are Compatible
When adding any plugin or theme to your WordPress site, make sure it is compatible with the version of WordPress you are using. You can recheck this through your WordPress dashboard.
Don't Update Plugins at the Same Time
Avoid executing more than one update at the same time. Instead, update the WordPress plugins as they become available so you can quickly determine if any specific feature is causing the problem.
How to Customize your WordPress Maintenance Page?
WordPress has a built-in feature that automatically enables a maintenance mode in the wp_admin area, alerting the visitors that your website is under construction through a popup message. The same is also applicable when you are running a security patch to fix a vulnerability.
However, you can also customize the same message by adding a plugin to create an aesthetically pleasing page before carrying out the scheduled update. Here, you can insert email forms, social media links, and even a timer to alert the visitors when your site goes back live.
For example, one of our favorite plugins at WP Clipboard is Elementor. It's easy to use with drag-and-drop features, allowing the users to create any page design within minutes. This also includes a maintenance mode that you can enable through the tools tab. With Elementor, you have the option to create your own maintenance page or choose from their pre-designed templates. Select according to the website's demand.
Another popular plugin is the SeedProd maintenance page. To activate this particular plugin:
- Click on the Settings tab in your WordPress dashboard;
- Choose the Coming Soon Pro option;
- Select the status of your site – whether you want the maintenance mode or the coming soon page activated;
- Choose the page design from various layouts and customize according to your requirement.
Now you finally know how to fix the WordPress stuck in maintenance mode error without losing prospects – and sleep. And if the updates are taking longer than usual, don't forget to transform the page into an attractive design that is a far cry from the dull, white page we see on the WordPress sites by default.
We hope this article was helpful to resolve the maintenance issue on your website. You may also want to read our ultimate guide on ways to fix the WordPress update failed error.