If you are getting the message “Briefly unavailable for scheduled maintenance. Check back in a minute.” on your WordPress site which makes your site inaccessible from both front end and admin side then don’t worry and wait for few minutes until the WordPress completes its upgradation process and removes this message but if you are still getting this message after waiting for some time then you need to remove it by referring the information provided below.
What does “Briefly Unavailable for Scheduled Maintenance” mean?
“Briefly unavailable for scheduled maintenance. Check back in a minute.” simply means on your WordPress site the upgradation of theme, plugin or WordPress is in progress.
The message technically is not an error or issue but a notification and a feature of WordPress core that gets enabled by calling the WordPress function wp_maintenance when the update is in progress.
This update may be initiated by you or by WordPress automatically. Automatic WordPress background updates were introduced in WordPress version 3.7 which allows WordPress to update itself to minor releases.
When the update is in progress then the WordPress loads new updated zip file, unzip it and copied over while old files are deleted. This process takes some time and in the meanwhile if anybody try to access the functionality provided by these incomplete files manipulated by update process then he may corrupt the files or get unexpected results so to avoid this WordPress stops accessing any of the files by displaying this maintenance message until the update completes if the upgradation is running from more than 10 minutes.
What causes to display “Briefly Unavailable for Scheduled Maintenance” indefinitely?
To display the maintenance message WordPress creates .maintenance file in the root directory of WordPress when the update process starts and deletes this file after completing the upgradation process.
This action of creating and deleting .maintenance file runs smoothly until the upgradation process gets interrupted and stopped by a problem or crash like Script execution timeout, Internal Server error, Web server’s slow response or Low memory etc. which prevents WordPress to delete created .maintenance file resulting in displaying maintenance message forever.
How you can remove this “Briefly Unavailable for Scheduled Maintenance” message from your site?
You can remove this message easily by accessing your site’s root directory which contains wp-content directory along with .maintenance file so just delete the .maintenance file from there.
On most of the systems the .maintenance file is hidden file so you have to make it viewable to delete it.
You don’t need to worry when deleting this file as this is not WordPress core required file and the WordPress will create it again when necessary.
You can use FTP, cPanel or any other remote file access provider tool like SSH to access and delete this file as described below.
Deleting .maintenance file using FTP :
You have to get FTP details of your site from your site hosting provider then connect to the site using those details and access your site root directory using any FTP client like FileZilla to delete the .maintenance file as displayed below.
After accessing your site root directory using FTP if you don’t see the .maintenance file then it may be because it’s hidden so make sure you configured your FTP client to show hidden files. In Filezilla, you can configure it to show hidden files by clicking on the menu Server » Force showing hidden files as shown below.
Deleting .maintenance file using cPanel :
cPanel is one of the most popular file manager but not the only file manager so you can use any file manager that your host provides to access your site files on the server. Configuration of all file managers are almost same so if your hosting provider uses a different file manager than cPanel then also you can follow this instruction to access your site files but if you face any issue with it then you can contact your host for instructions on how to access your WordPress root directory.
Like FTP as described above you have to get your site cPanel details from your hosting provider and then access your site root directory using it to delete the .maintenance file as displayed below.
If you don’t see the .maintenance file then just make sure to configure cPanel to show hidden files as displayed below.
After following above instructions if you still see the scheduled maintenance message then please test it on a different browser or try clearing your browser’s cache.
In some cases i noticed that some aggressive server side caching techniques also caches the above page even after deleting it so you still get the maintenance message in that case just clear the site cache or temporary disable the cache.
Sometimes when you update WordPress or make any changes in the files using only admin details then it may generate this message or white screen of death error which creates inconvenience and downtime until it gets resolved by accessing the site files using FTP or cPanel so it is recommended to always have FTP or cPanel details handy to resolve the issue ASAP.
How you can pre-plan and avoid “Briefly Unavailable for Scheduled Maintenance” error to occur on your site?
This issue occurs mostly because of reaching maximum script execution time or memory limit so update the plugins, themes or WordPress one at a time and not all at once to avoid script execution load.
Do back up your entire WordPress site before you perform an update so if anything goes wrong then you can recover it.
Sometime you face this issue because of the error generated by incompatibility of updated plugins, themes or WordPress so do ensure in advance before updating that all your plugins/themes are compatible with the latest version of WordPress and if not then contact to the plugin or theme developer to inquire about when they plan to release a new version.
Instead of updating frequently you can wait for some time and bulk update when number of updates available are many. In this case instead of displaying default WordPress maintenance message “Briefly unavailable for scheduled maintenance. Check back in a minute.” to your site users you can customise this message and page to display temporary customised maintenance page using any of the plugins as following so that your site users won’t think this as an issue but the scheduled maintenance.
If you don’t want to use any plugins to customise this message and have a bit development knowledge then you can create a customised maintenance mode page by simply creating a new file maintenance.php inside your WordPress site’s wp-content directory and add the following code in it.
<?php $protocol = $_SERVER["SERVER_PROTOCOL"]; if ( 'HTTP/1.1' != $protocol && 'HTTP/1.0' != $protocol ) $protocol = 'HTTP/1.0'; header( "$protocol 503 Service Unavailable", true, 503 ); header( 'Content-Type: text/html; charset=utf-8' ); ?> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"<?php if ( is_rtl() ) echo ' dir="rtl"'; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title><?php _e( 'Maintenance' ); ?></title> </head> <body> <h1><?php _e( 'We are updating the site, please check back after some time.' ); ?></h1> </body> </html> <?php die(); ?>
Please change the text in the above code to whatever you want to and use CSS to style this page anyway you want.
I hope you find the information provided here helpful but if you have any questions regarding fixing this issue or any other WordPress question then feel free to ask it in our free WordPress support forum where i would be glad to help you.