Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

Turn Magento Maintenance Mode On and Off

This guide shows you how to put a "we will be back soon" page on your shop while you work on it, and how to take it off.

CMS and Apps2 min read10 steps

What is maintenance mode?

Magento is a free tool for building online shops. Maintenance mode is like a "Closed" sign on a shop door. Visitors see a short message instead of your shop. You can then update or fix things in peace.

This guide works for Magento 1.x, which is old software. Newer versions use a command instead (shown below). The idea is the same.

Before you start

Take a backup. If you will leave the shop closed for a long time, tell your customers first.

Magento 1.x: turn it on

  1. Open File Manager in your hosting control panel.
  2. Go to the folder where Magento is installed. This is the folder that holds index.php.
  3. Click + File to make a new file.
  4. Name it maintenance.flag.
  5. Click Create New File.
  6. Open your shop in a new tab. You should see the maintenance page.

The file can be empty. Magento only checks whether it exists.

Magento 1.x: turn it off

  1. Open File Manager and go to the same folder.
  2. Click maintenance.flag to select it.
  3. Click Delete. Delete only this file. It holds no data.
  4. Refresh your shop. It should be back to normal.

Magento 2: use the command line

This needs SSH, which is a way to type commands on your server. Ask Hostvento support if SSH is on your plan. Go to your Magento folder and type:

php bin/magento maintenance:enable

This turns maintenance mode on. To turn it off, type:

php bin/magento maintenance:disable

This puts your shop back online.

Let your own computer in

In Magento 2 you can allow one address, so you can test while others see the closed sign:

php bin/magento maintenance:allow-ips 203.0.113.5

This lets the address 203.0.113.5 see the real shop. Use your own IP address instead. An IP address is the number that identifies your internet connection.

Tip: If the maintenance page stays after you remove the file, clear your browser cache and the Magento cache.

Quick recap

  • Maintenance mode shows a closed sign to visitors.
  • In Magento 1.x, create maintenance.flag to turn it on and delete it to turn it off.
  • In Magento 2, use maintenance:enable and maintenance:disable.