WordPress has its own built-in maintenance mode. As this mode is part of the WordPress core, it can't be deactivated or changed.
The corresponding function is called:
wp_maintenance()
You can find it in wp-includes/load.php.
How the WP maintenance mode works
Essentially, wp_maintenance() checks the timestamp of a file previously created in the root directory, the .maintenance. If the timestamp exceeds a certain limit, WordPress automatically activates maintenance mode.
The maintenance mode itself is a good thing because it prevents incorrect, incomplete or dysfunctional versions of your site from being delivered. So while your users may see the maintenance screen, it also prevents e.g. orders from failing.
What exactly triggers the maintenance mode?
Maintenance mode is often activated after the following actions:
Plugin or theme updates
Creating or restoring backups
Switching changes from a staging environment to live
These actions do not always automatically trigger maintenance mode themselves, but they can increase the likelihood of it. This is because major changes to the WordPress core or database can sometimes take a very long time. WordPress reacts to this delay and switches on maintenance mode.
How can I switch maintenance mode off again?
Once maintenance mode is active, you have two options:
You can wait until it is deactivated again. We strongly recommend this solution: maintenance mode exists for a reason and protects your site from data loss and damage.
You can delete the .maintenance file at your own risk. By deleting the file, the maintenance mode is automatically deactivated and you access the page normally again.
⚠️ Caution: If you end the maintenance mode manually, you'll no longer know for sure when exactly the change that originally triggered the maintenance mode was completed. This can lead to conflicts when starting further changes and can result in data loss or the page crashing.
How to delete the .maintenance file
Connect to your Box via SFTP. You will find the SFTP data you need in your Box overview, directly next to the screenshot of the page.
Now go to the wordpress folder, find the .maintenance file and delete it manually from your file system.
