Just like humans, websites have their own downtime too. Every so often, a website needs to be maintained to keep its stability and add more feature enhancements, either by updating the website codebase or underlying server infrastructure. Updates not only allow for new features and stability; it is essential for overall website security. A website that is seldom updated is a prime target for a cyber attacker with malicious intent.
However, not all updates are going as smoothly as planned. Sometimes, the update could be stopped for unknown reasons, leaving the website in “Maintenance mode” loop. As a widely-used content management system with a rapid update pace, WordPress is a prime example of this. Sometimes, the WordPress update process could fail and has to be stopped to protect your data. The most common reason for WordPress update failure is incompatible plugins and/or themes.
Fixing WordPress Stuck in “Briefly unavailable for scheduled maintenance. check back in a minute.” page
There are a few steps you can try to troubleshoot a WordPress site that is stuck in maintenance mode. Technically, maintenance mode is not an error, rather, it is a notification page which is shown when WordPress core, plugins, or themes are being updated. The update files are downloaded in the background by WordPress, extracted, then installed on demand. To avoid data loss during the update, WordPress puts a “maintenance mode” notice. However, when updates failed, the maintenance mode notice might be stuck longer.
Remove .maintenance file
The first step you can try to troubleshoot the maintenance mode loop is through FTP. When WordPress update process is started, WordPress placed
.maintenance file in the root of the website folder to alert users that it is updating. WordPress will stay in maintenance mode unless this file is removed.
To remove the file, open your FTP client, and log in to your website through your FTP credentials. Then, open the root folder of your website, and remove the
.maintenance file. It is a hidden file, and you might need to enable the option to show hidden files and folders before continuing. After deleting the file, try refreshing the website. It will get out of maintenance mode loop and function as normal. If this does not solve the problem, try the next step.
If that’s not enough
Another file that is used by WordPress to indicate that it is in maintenance mode is
wp-activate.php. Find this file in the root folder of your website, and download the file.
Open the file in the file manager, and find the line
define(WP_INSTALLING, false);. Change the
false value to
true, and upload the file back to your website. If there is a warning stating that the file exists, click “Overwrite” to upload the new version anyway.
If the error persists, you might need to manually upload a new version of WordPress through FTP. Start by visiting wordpress.org, and click “Download” to get the latest version of WordPress. After downloading WordPress, extract the file in an easy to reach location, such as your desktop, then open your FTP client.
Enter your FTP credentials as usual, and you will be seeing the root folder of your website. Upload all the files you extracted, and overwrite files in the server as needed. Afterward, you can visit the website again and click the “Update WordPress Database” to continue.
Check your plugins
Another problematic area that you can troubleshoot is plugins. WordPress’s excellent plugin system is like a double-edged sword; in a way, it could extend WordPress’ functionality by a huge stride, but it can also cause incompatibility problems. To manually uninstall a plugin, you can use FTP. Log in to your website, as usual, using an FTP client, and navigate to “wp-content/plugins”.
Back up plugins you still wish to use to your computer and delete all plugins in the folder. You should be able to log in to your WordPress dashboard to disable maintenance mode. Then, reinstall the backed-up plugins one by one via FTP to see which plugins caused the problem in your WordPress site.
To avoid this problem in the future, you should avoid closing the browser tab while an update is in process. Wait patiently until you see “Disabling maintenance mode” and “Plugin/theme updated successfully” message appear on your screen. By ensuring that updates complete at their own pace, the risk of update failure is significantly reduced.
However, if you like to do regular, scheduled maintenance to your website, you can announce it better through the use of plugin or coding. For example, you can change the “Briefly unavailable for scheduled maintenance” by writing this simple code and uploading it as
<h1>We are updating the site, please check back soon.</h1>
You can also choose the coming soon/maintenance mode template to include your messages (such as when your website will be back online). You can install SeedProd Coming Soon plugin through WordPress’ admin interface.
433 total views, 2 views today