Nexcess Logo

How to disable maintenance mode in Magento

Knowledge Base Home

Notice anything different?

We've enhanced the appearance of our portal and we're working on updating screenshots. Things might look different, but the functionality remains the same.
September 11, 2019

This article shows how to disable maintenance mode in the event your store shows the error message, “The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.” This also sometimes appears as HTTP error code 503.

ATTENTION: This error code is often the result of a failed or prolonged installation, upgrade, or backup causing your store to become “stuck” in maintenance mode. It is easily fixed with the below solution, or by contacting our Support Team for assistance.

 Read Magento 1 vs Magento 2: Should You Stay or Should You Go?

Core issue

By default, both Magento 1 and 2 will put your store in maintenance mode when installing or upgrading, or during backup creation. In most cases, this works as expected, and your store exits maintenance mode after the operation completes.

However, when larger operations fail, it can sometimes cause your store to become “stuck” in maintenance mode. Stores in maintenance mode show the message, “The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.”

Solution

To stop maintenance mode and restore your store’s normal function, use one of the below methods to delete the maintenance.flag file in Magento 1, or the var/.maintenance.flag file in Magento 2.

ATTENTION: Angled brackets (<>) indicate placeholder information. Replace those brackets and everything between them with the indicated value.

File Transfer Protocol (FTP)

This method requires you have a working FTP client configured to use with your server. If you already do, skip to Step 3. 

  1. Follow the instructions provided in How to add FTP accounts with SiteWorx. Take note of your FTP username and password, and then continue to Step 2.

  2. Download and install an FTP client. Although many are available, FileZilla is a popular choice. See How to set up FileZilla for more information.

  3. Use your FTP client to find and delete maintenance.flag or var/.maintenance.flag, as appropriate. See How to use FileZilla for guidance about how to navigate an FTP interface.
    • For Magento 1, in root, delete maintenance.flag
    • For Magento 2, delete var/.maintenance.flag

Secure Shell (SSH)

  1. Log in to your Magento server using SSH.

  2. Change to the directory containing your Magento installation:
    cd <path_to_magento_root>/public_html/
  3. Remove the maintenance.flag or var/.maintenance.flag file, as appropriate:
    • For Magento 1, issue:
      rm maintenance.flag
    • For Magento 2, issue:
      rm var/.maintenance.flag

Magento 2 command line tool

This method only works in Magento 2. See the Get started with command-line configuration article on the Magento 2 website for more information.  

Issue the below command to remove the var/.maintenance.flag file:
bin/magento maintenance:disable

Additional information

See the Magento documentation for more information about Magento maintenance mode.

For 24-hour assistance any day of the year, contact our support team by email or through your Client Portal.

Jason Dobry
We use cookies to understand how you interact with our site, to personalize and streamline your experience, and to tailor advertising. By continuing to use our site, you accept our use of cookies and accept our Privacy Policy.