All Collections
Troubleshooting Server and Application
How to Fix WordPress Stuck in Maintenance Mode
How to Fix WordPress Stuck in Maintenance Mode
Emmad avatar
Written by Emmad
Updated over a week ago

Table of Contents

Sometimes when you’re making changes to your website, you’ll see a message similar to the following saying your site is undergoing scheduled maintenance.

WordPress can get stuck in maintenance mode during a scheduled WordPress update or when you’re updating a bunch of plugins or themes.

If WordPress is interrupted during this process, it doesn’t have the chance to take your site out of maintenance resulting in locking down your site and making it unavailable. WordPress automatically puts your site into maintenance mode during updates, so your visitors don’t see a broken version of your website. So how do you go about fixing the WordPress that is stuck in the maintenance mode screen?

How to Fix WordPress Stuck in Maintenance Mode

To solve this problem, we’ve put together a detailed guide to fix being stuck in WordPress maintenance mode fast, which you can read here.

  1. Remove .maintenance file:

    To take your WordPress site out of maintenance, the easiest method is to delete the .maintenance file. You’ll need to find your site’s root folder by connecting via SSH/SFTP and then navigating to /home/master/applications/APP_DIRECTORY/public_html/ and delete the file named as .maintenance

  2. Deactivate plugins:

    You could try renaming your plugins directory to plugins-backup

    mv /home/master/applications/yourapp/public_html/wp-content/plugins /home/master/applications/yourapp/public_html/wp-content/plugins-backup

    Try accessing your site. If it works, rename the directory to its original name. Then, try disabling every plugin on your site and re-enabling them until your site breaks again to pinpoint the problem plugin. You can first check which plugins are enabled with the command:

    wp plugin list

    You can then deactivate all of them with

    wp plugin deactivate --all

    To activate your plugins again, you can use

    wp plugin activate --all

    You can also activate them one by one.

    wp plugin activate plugin-name

    You can find more information about WP CLI here.

  3. Edit wp-activate.php:

    This can be found in your application web root just like the .maintenance file . You can edit a line of code in this file to resolve the issue if above two do not work. Access the file via SSH/SFTP. Open the file to edit it and find this line of code:

    define ('WP_INSTALLING', true)

    Change true to false. The code will then look like this:

    define ('WP_INSTALLING', false)

    Save and exit to and see if the issue is resolved.

That’s it! We hope this article was helpful. If you need any help, then feel free to search your query on Cloudways Support Center or contact us via chat (Need a Hand > Send us a Message). Alternatively, you can also create a support ticket.

Did this answer your question?