How To Fix WordPress Stuck in Maintenance Mode?

WordPress Maintenance Mode is a feature that allows you to take your site offline while you perform updates, migrations, or other maintenance tasks. It displays a custom “site under maintenance” page to visitors instead of your normal site content.

However, sometimes WordPress can get stuck in maintenance mode, leaving your site inaccessible even after the maintenance is finished. Here are some troubleshooting tips to fix WordPress stuck in maintenance mode:

The first place to check is your main WordPress configuration file, wp-config.php. Maintenance mode is usually activated by adding the following line:

define(‘WP_CACHE’, true);

If you find this line, simply delete it or comment it out to deactivate maintenance mode. Just make sure there are no other maintenance mode plugins/settings overriding this. You can overcome errors like this with a WordPress update service.

If making the wp-config change didn’t work, your next step is to check if you have any caching or maintenance mode plugins installed, and examine their settings.

Log in to your WordPress dashboard, go to “Plugins > Installed Plugins” and disable any plugins relating to caching, maintenance mode, CDNs or firewalls. Then check if your site comes back online.

If deactivating a plugin fixed things, reactivate it once your site is working again. Then go to the plugin settings to ensure the maintenance mode is disabled.

Some WordPress hosting services like Pagely generate a .maintenance file to put the site in maintenance mode.

Use FTP to access your site files and check if there is a .maintenance file in the root folder. If so, rename or delete this file and check your site. In case if something happens, get in touch with an emergency WordPress support service.

If you have an active caching plugin, stale cached pages may be displaying rather than your actual site content. Log in to your cache plugin’s dashboard and find options to clear/purge all caches and cached pages.

After Flushing the object cache and page cache, check if your real site content appears again. You may need to also clear server-level caches using a plugin.

Finally, WordPress may generate a wp-content/maintenance.php file for maintenance mode. Use FTP or your host’s file manager to check your wp-content folder for this file.

If the maintenance.php file exists, delete it or rename it to something else like “maintenance.php-old”. This should disable the maintenance mode on your site.

That covers the major instances where WordPress core files or plugins can get stuck in maintenance mode. Carefully checking each issue can help identify and fix the problem, bringing your site back online. Make sure to properly disable maintenance mode afterwards to avoid potential repeat issues down the road. If you can’t do it on your own, you should hire a WordPress developer.

Sometimes the issue of WordPress stuck in maintenance mode lies not with WordPress itself, but with your hosting environment. Here are some hosting-related issues to check:

Login to your web host’s control panel and check if there are any features enabled that could put your WordPress site into maintenance mode. Some hosts have staging modes, restricted modes, or maintenance options that could cause this. Disable any such features.

Check the .htaccess file associated with your site files and see if there is any custom code inserted by your host that could enable maintenance mode. Remove any suspicious lines.

Try switching your WordPress site to a different domain or migration to a new hosting account as a test. If the site comes back online there, an issue with the original hosting environment could be trapping WordPress in maintenance.

Finally, check with your WordPress host’s support documentation and open a support ticket if none of the above work. There could be server-level restrictions or application faults that only your host can fully troubleshoot and resolve.

Issues with the current active WordPress theme can also sometimes trigger site-wide maintenance mode. To troubleshoot theme issues:

Switch your WordPress site to a basic default theme like Twenty Twenty-Two. If the site comes back online, there is likely a conflict with code in your previous custom theme.

Review any custom edited templates in the faulty theme for errors that could have broken crucial WordPress functionality. Revert problematic template files to default if found.

Check the theme settings, specifically the customizer options, for any maintenance mode toggles. Disable those to see if your site is restored. If so, leave maintenance disabled.

Finally try installing and activating a few other alternative themes. If working properly, they should take precedence over any faulty code in an outdated theme that had your site stuck.

svg%3E
Written ByDhruva Khanna

A seasoned technology writer and marketing consultant with over a decade of experience helping businesses grow online. I specialize in content marketing, SEO, web design, and e-commerce development. I am enthusiastic about using cutting-edge technology to acquire high-quality traffic, generate leads, and increase sales for my clients.