• Categories
    • Tutorials
    • Beginners Guide
    • WordPress News
    • WordPress Security
    • Best WordPress Plugins
    • WordPress Themes
    • Product Reviews
    • WP Tips & Tricks
  • Guides
    • Start a Blog
    • Make a Website
    • WordPress Hosting
  • WordPress Hosting
    • A2 Hosting
    • HostGator
    • Bluehost
    • Cloudways
  • Managed Hosting
    • WPEngine
    • Rocket.net
    • WPX
    • Kinsta
  • Coupons
    • WPEngine
    • Flywheel
    • Cloudways
    • A2 Hosting
    • WPX Hosting
WordPress Tutorials

How to Fix the “Briefly Unavailable for Scheduled Maintenance. Check back in a minute.” Error in WordPress

Last Updated on: June 23, 2022 Daniel Pataki 14 Comments

How to Fix the “Briefly Unavailable for Scheduled Maintenance. Check back in a minute.” Error in WordPress

There’s an error in WordPress which occurs rarely when an update fails to complete. It usually happens when you update the WordPress core itself, compounding the fear factor. The message your receive is “Briefly unavailable for scheduled maintenance. Check back in a minute”. In this article I’ll take a look at why this happens and how you can resolve the issue.

I thought I’d give you a bit more information than other articles usually delve into so I’ve split the article into two sections, the quick fix/quick explanation and the longer version – in case you’re interested in details.

The Quick Fix

As a safety precaution and an indicator to users WordPress puts the site in maintenance mode before starting the update. This prevents users from trying to save data during the process for example.

Once WordPress completes the update process it takes the website out of maintenance mode, thus restoring normality.

If something happens before the site is taken out of maintenance mode (this usually means a PHP timeout) the execution of code stops so the site remains in maintenance mode indefinitely. All we need to do is figure out how WordPress achieves maintenance mode and undo it manually.

Luckily it’s all very simple. WordPress places a hidden file into your main directory named “.maintencance”. In case you’re not familiar with these types of files: this is a dotfile. Dotfiles are hidden files on Unix based systems like Linux or OSX. Deleting it may be difficult without the right tools since you may not see them in a normal directory listing.

Method 1: Using FTP

If you are using an FTP program to view your remote files you can usually enable the “view hidden files” option.

This is most often found in the “view” menu of the program. If you can’t find this option, consult the documentation of your application. Once switched on you should see the “.maintenance” file in the list. Simply delete it to make your woes go away.

Method 2: Using The Terminal

If you are using an SSH connection to view your server’s files you can view hidden files by typing the “ls -a” command. With the terminal you don’t need to list a directory to delete files so you can just navigate to your WordPress root folder and type “rm .maintenance” and that’s it.

Still Having Issues?

In the majority of cases simply removing this file will get everything to pop back into place. According to the WordPress Codex FAQ:

To stop that message from being displayed to vistors, just delete the .maintenance file. The automatic upgrade should be executed again, just in case it failed.

This essentially means that once you remove the file the update is performed again. If something seems wrong, or perhaps the update failed once more, your best bet is updating WordPress manually. The Manual Update section in the Codex does a pretty good job of explaining this.

You’ll need to grab the latest WordPress files and extract them on your computer. Follow that up by deactivating all your plugins. Then, through FTP or SSH access, delete the wp-admin and wp-includes directories in your WordPress root folder. Upload the wp-admin and wp-includes directories from the newly extracted files.

Once done, upload all files that go in the root directory (wp-login.php, wp-cron.php, etc.). You can safely overwrite every file and folder except two. Do not overwrite wp-config.php or the wp-content folders. wp-config.php holds your configuration, if you overwrite that file you’ll loose access to your database. The wp-content houses your themes and plugins, deleting or overwriting that folder may cause you to loose your themes, or changes you’ve made to them.

Once you’re done WordPress may ask you to update your database but otherwise the dreaded “Briefly unavailable for scheduled maintenance. Check back in a minute” message should now disappear and everything should be back to normal.

Digging Deeper

I always like to try and explain the why of the situation, so let’s dig a bit deeper to see exactly what’s going on under the hood. The maintenance message is displayed when a specific set of conditions are met. This can be seen in the inline documentation of the “wp-includes/load.php” file. The following can be found starting at line 145, just before the wp_maintenance() function.

Checks for a file in the WordPress root directory named “.maintenance”.
This file will contain the variable $upgrading, set to the time the file
was created. If the file was created less than 10 minutes ago, WordPress
enters maintenance mode and displays a message.

The default message can be replaced by using a drop-in (maintenance.php in
the wp-content directory).

Looking closely at this function you can see that you can actually add your own custom maintenance message by plopping a file into the wp-content directory named “maintenance.php”. If this file exists it will be displayed, otherwise the default message will be used.

The update procedure itself is well documented in “wp-admin/includes/update-core.php” starting with line 730 before the update_core() function. A small excerpt from the documentation shows the steps taken, step 2 is the creation of the maintenance file, step 6 is the removal.

1. Test unzipped location for select files to ensure that unzipped worked.
2 . Create the .maintenance file in current WordPress base.
3. Copy new WordPress directory over old WordPress files.
4. Upgrade WordPress to new version.
4.1. Copy all files/folders other than wp-content
4.2. Copy any language files to WP_LANG_DIR (which may differ from WP_CONTENT_DIR
4.3. Copy any new bundled themes/plugins to their respective locations
5. Delete new WordPress directory path.
6. Delete .maintenance file.
7. Remove old files.
8. Delete ‘update_core’ option.

The function that actually creates the maintenance file is called maintenance_mode() and can be found in “wp-admin/includes/class-wp-upgrader.php”. You can see how it adds the $upgrading variable set to the current time. If the function is called with true as the first parameter it simply deletes the file. if the upgrade procedure fails any time before this delete method is called the site will be stuck in maintenance mode.

Conclusion

“Briefly unavailable for scheduled maintenance. Check back in a minute” can seem like a scary message if it your site is stuck on it, but it’s one of the more benevolent ones out there, fixing it is pretty easy and it usually doesn’t mean any database issues afterward.

We hope this article helped you learn how to fix the briefly unavailable for scheduled maintenance error in WordPress. You may also want to see our post on how to fix error establishing a database connection error, which is one of the most common errors in WordPress.

If you’ve ever bumped up against a particularly stubborn message which took extra effort to get rid of, let us know!

+ Share
Disclosure

Daniel Pataki

Related Posts

Back to all articles
  • How to Increase the Memory Limit in WordPress

    How to Increase the Memory Limit in WordPress

  • What is WordPress? A Beginner's Guide!

    What is WordPress? What Can it do & Is it Right for You? A Beginner’s Guide

  • How to Use Git to Push Your Local Site Live

    How to Use Git to Push Your Local Site Live

Coupons

View more deals
  • Recipe Card Blocks Coupon
    15% OFF

    Recipe Card Blocks Coupon

    Running a cooking or food website can be fun (and tasty) – but
    Get This Deal
  • WP 2FA Coupon
    20% OFF

    WP 2FA Coupon

    Security should be at the forefront of all site owner’s min
    Get This Deal
  • Themskingdom Coupon
    20% OFF

    ThemesKingdom Coupon

    First impressions count. As such, you’ll want a WordPress t
    Get This Deal
14 Comments Leave a Reply
  1. Shannon says

    July 29, 2016 at 2:02 am

    The quick fix just worked for me! The maintenance sign came up after I tried to update my plug in “Ninja Forms”. Thank you, Thank you, Thank you!

    Reply
    • Dev says

      July 29, 2016 at 3:33 am

      No problem, Shannon. Glad we could be of help :).

      Reply
  2. max says

    September 13, 2016 at 10:09 am

    great article – helped me solving this issue within a minute. thanks!

    Reply
  3. Gary says

    September 23, 2016 at 4:52 pm

    I get the “Briefly unavailable…” message ONLY when I open the plugins page (…/wp-admin/plugins.php). No other part of the site is affected and the site itself loads without errors.

    I’ve reinstalled WordPress (4.6.1) from scratch and there isn’t a .maintenance file in the root folder or in wp-admin, wp-content or wp-includes. There’s no maintenance.php file in wp-content either. A text search on the database didn’t show any “”Briefly unavailable” text.

    I moved all files from the “Plugins” folder to a temp folder to see if a plugin was causing the issue. No change; I still see the “Briefly unavailable…” message.

    So I’m stumped. Any suggestions on where the message coming from? My guess at this stage is that there’s maybe some hidden file in the root folder that’s the cause but I can’t see such a file in FTP or File Manager.

    Reply
  4. Tedi says

    October 13, 2016 at 2:23 am

    Its works !! hehe .. tks

    Reply
    • Dev says

      October 13, 2016 at 3:00 am

      Glad to be of help, Tedi :).

      Reply
  5. prabodh says

    October 27, 2016 at 5:30 am

    Was worried how to fix this problem. Thanks a lot, was able to fix in in just 5 minutes.

    Reply
  6. Lewis says

    November 4, 2016 at 4:42 am

    Awesome! Thanks so much – Your articles have helped me on several occasions. Winning.

    Reply
  7. Marileen says

    November 14, 2016 at 8:27 am

    My problem is not hat it gets stuck in the Briefly unavailable for maintenance message screen, my problem is that it does this over and over and over again, even if I delete the maintenance file in my root. Every time I try to update any plugin or theme it either does that, or gives me a 404 page not found error. But most times the maintenance issue. I can not update my plugins at all as the same message pops up over and over again…

    Reply
  8. Marcos says

    May 22, 2017 at 10:24 am

    Hello,

    Working for years with wordpress and first time see of this issue

    Removed .maintenance and issue resolved!

    Thanks Dev for the help !

    Reply
  9. Paul says

    September 6, 2017 at 1:23 pm

    Awesome. Thanks for the HELP!
    I hate rubbish client hosting packages.

    Reply
  10. Tami says

    December 27, 2017 at 8:21 pm

    This is adorable…”occurs rarely when an update fails to complete.” My website crashes EVERY time I update a plugin or theme. I wish I had known WordPress had so many issues before I set up several websites with it.

    Reply
  11. Lene Larsen says

    April 17, 2018 at 1:08 pm

    Thank you. Issue fixed

    Reply
  12. Jen Goode says

    May 26, 2018 at 9:02 pm

    Thank YOU! Your article was so easy to find and helped me prevent panic in under 5 minutes, I appreciate you’re sharing the tip.

    Reply

Leave a Reply Cancel reply

Full Disclosure This post may contain affiliate links, meaning that if you click on one of the links and purchase an item, we may receive a commission (at no additional cost to you). All opinions are our own and we do not accept payments for positive reviews.

THE BEST OF WPKUBE

Some of the best content we have published so far.

BEGINNER GUIDES & REVIEWS

18 Best Cheap WordPress Hosting Providers in 2023 (From $1.99)
210 Best WordPress Hosting Options for 2023 (Pros & Cons)
38 Best Managed WordPress Hosting Providers for 2023 Compared
45 Best WooCommerce Hosting Providers Compared in 2023 (All Budgets)
5Top 9 Landing Page Plugins for WordPress (2023)
69 Best List Building Plugins for WordPress In 2023
7How to Fix the 500 Internal Server Error on Your WordPress Website
8Thrive Themes Review: A Look At The Full Membership
9Beaver Builder Review: Is it The Best Page Builder Plugin for WordPress (2023)?
10OptimizePress Review: Create Landing Pages with Ease
11How to Make a Website: Complete Beginner’s Guide
12Top 22 Best Free Stock Photo Resources For Your Site
1317 of the Best Google Fonts for 2023 (And How to Use Them in WordPress)
14How to Start a Blog in 2022 (Step by Step Guide)
15How To Fix ‘503 Service Unavailable’ WordPress Error
1611 Best Contact Form Plugins for WordPress in 2023
17How to Add a Custom Logo to Your WordPress Site
18How to Fix Error Establishing a Database Connection in WordPress

WPX Hosting: 50% OFF

Save 50% on WPX Hosting using our exclusive coupon code.

Get this Deal

Flywheel(our review)

Our Newsletter

Get awesome content delivered straight to your inbox.

Thank you!

You have successfully joined our subscriber list.

.
Featured In Forbes Huffpost Entrepreneur SEJ

About WPKube

WPKube is an online WordPress resource which focuses on WordPress tutorials, How-to’s, guides, plugins, news, and more. We aim to provide the most comprehensive beginner’s guides to anything about WordPress — from installing plugins, themes, automated installs and setups, to creating and setting up pages for your website.

We have over 500+ tutorials, guides, product reviews, tips, and tricks about WordPress. Founded by Devesh Sharma, the main goal of this site is to provide useful information on anything and everything WordPress.

Twitter Facebook

Useful Links

  • Behind the Scenes
  • Beginner Guides
  • WordPress Hosting
  • WooCommerce Themes
  • MeridianThemes
  • Exclusive WordPress Deals
View All Guides »

Reviews

  • WPEngine 33% OFF
  • Thrive Leads
  • Flywheel 33% OFF
  • Divi Theme 20% OFF
  • Thrive Architect
  • Elegant Themes
Reviews »

Deals

  • InMotion Hosting
  • LifterLMS Coupon
  • LiquidWeb Coupon
  • WPEngine Coupon
  • A2 Hosting
  • FloThemes
More Deals »
© Copyright 2023 WPKube ® All Rights Reserved.
  • Contact
  • Site Terms
  • Disclosure
  • Privacy Policy