So I ran into this problem. No matter what I did my WordPress installation displayed a stupid error that read as follows:

Briefly unavailable for scheduled maintenance. Check back in a minute.

Fig.01: How to Fix Briefly Unavailable for Scheduled Maintenance Error in WordPress

Here is how to fix this problem with WP.

What is the hell is a .maintenance file in WP?

When you upgrade WP or plugin, it creates a .maintenance file WordPress installation directory. You can see this file with cat command:
$ cat .maintenance
Sample outputs:

<?php $upgrading = 1490382161; ?>

From the WordPress source code:

* 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.

So you need to wait for 10 minutes or simply delete this file using rm command or using ftp/sftp session to get rid of this annoying problem:
$ cd /var/www/html/
$ ls -l .maintenance
-rwxrwxrwx 1 www-data www-data 33 Mar 24 19:02 .maintenance
$ rm -v .maintenance
removed '.maintenance'

And my problem was solved.

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 7 comments so far... add one

CategoryList of Unix and Linux commands
Disk space analyzersncdu pydf
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
7 comments… add one
  • andy Mar 26, 2017 @ 8:55

    shouldn’t that be cd /var/www/html

  • szarik Mar 26, 2017 @ 9:31

    Really ‘rm /var/www/html/’?

  • h4ckt1c Mar 26, 2017 @ 10:03

    Are you sure to delete /var/www/html or do you wanted to change directory using the cd command? ^^

  • r0073rr0r Mar 26, 2017 @ 10:45

    rm /var/www/html/
    cd /var/www/html/
    ? :)

  • Andi Mar 26, 2017 @ 12:02

    > rm /var/www/html/

    Are you sure…?

  • 🐧 Vivek Gite Mar 26, 2017 @ 13:29

    @All, yes it was a typo (or was it? lol). I guess I was to frustrated when I wrote this due to this stupid bug my site was offline for an hour.

  • Rk Mar 29, 2017 @ 19:09

    I waited for 10 minutes nothing happened. I logged in using FTP and deleted the file. It started working again.

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum