Contact
Site: US UK AU |

How to disable maintenance mode in Magento

How to disable maintenance mode in Magento

Overview

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.

Table of contents

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 ftp-accounts-with-siteworx.html">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 the Client Portal.

Article Rating (No Votes)
Rate this article
  • Icon PDFExport to PDF
  • Icon MS-WordExport to MS Word
 
Attachments Attachments
There are no attachments for this article.
Related Articles RSS Feed
How to optimize Magento performance
Added on Mon, Jul 29, 2013
How to configure Magento 2 storefronts
Added on Wed, Dec 30, 2015
What are some useful Magento scripts?
Added on Mon, Oct 13, 2014
How to find and remove hanging Magento cron jobs with SSH
Added on Thu, Oct 30, 2014
How to enable CAPTCHA for user creation in Magento 2
Added on Mon, Feb 19, 2018
How to configure multiple Magento storefronts
Added on Mon, Jul 29, 2013
How to disable caching in Magento
Added on Tue, Nov 5, 2013
How to perform Magento database maintenance
Added on Tue, Jul 30, 2013
How to set up Magento 2 to use your SSL certificate
Added on Tue, Oct 11, 2016
How to set up outgoing SMTP email for Magento
Added on Thu, Oct 6, 2016