Here we will cover how to get a Magento site out of maintenance mode. This problem can be identified when Magento is showing Service Temporarily Unavailable and is stuck in Maintenance Mode.
Related Articles
Getting Started with cPanel
SSH into Shared Server
SSH into VPS or Dedicated Servers
Disable Maintenance Mode on Magento 2
- SSH into the server
- Navigate to the document root of the domain using
cd
EXAMPLE: If the Magento site is located in/home/userna5/public_html
, runcd /home/userna5/public_html
to change to the document root directory. - Disable maintenance mode by running
php bin/magento maintenance:disable
- Refresh the website page, purge your browser cache, clear the NGINX server-side cache (if applicable), and the site should no longer be in maintenance mode
Disable Maintenance Mode on Magento 1
- Log into cPanel
- Locate the document root of the domain
- Right-click on the
index.php
file located at the root of the domain and select Edit - Locate
$maintenanceFile = FILENAME;
in the file to find the variable name for the file
EXAMPLE:$maintenanceFile = ‘maintenance.flag’;
- Once that line is found comment that line out by adding # in front of the line
EXAMPLE:#$maintenanceFile = ‘maintenance.flag’;
- Once the variable name is identified, locate the corresponding file in the Document Root of the domain and delete that file from file manager
EXAMPLE: In the above examples, the file would be called "maintenance.flag". You will need to find that file and delete it. - Refresh the website page, purge your browser cache, clear the NGINX server-side cache (if applicable), and the site should no longer be in maintenance mode
This article covers Magento 1 and 2. If an updated
version is available and not documented here, drop us a comment so we
can work to get it updated for you as soon as possible!
Comments
0 comments
Article is closed for comments.