Magento 2 Maintenance

Magento 2 Maintenance

As a store owner you will need to block the access temporary for Customers in order to update CMS Page, Products or Updating Configuration. This is how you can do it.

As a store owner you will require at some point to block temporary access for Customers for maintaining, upgrading or reconfiguring the store. Magento offers a maintenance mode to disable access to the site while you do these.

It looks for a flag in the filesystem at a specific path var/.maintenance.flag. If the file is not present then Magento doesn’t enter Maintenance Mode, if it is then access is denied to Customers unless they are in the Allowed Ips list.

Maintenance Mode Enable #

To enable maintenance mode in Magento you can run the following command:

$ bin/magento maintenance:enable

Result will show:

Enabled maintenance mode

The command basically creates the file var/.maintenance.flag.

Maintenance Allow IP’s #

To allow certain IP’s to bypass Maintenance mode you can use the command bellow:

$ bin/magento maintenance:allow-ips

where is the IP allowed to bypass. And the mode will be show as:

Set exempt IP-addresses:

To add a allowed IP to a already existing list of IPs you can use the --add argument as bellow:

$ bin/magento maintenance:allow-ips --add

Result will be a list of all the previouse set IPs with the new addition last:

Set exempt IP-addresses:

All the IP’s added with this can also be reviewed via path var/.maintenance.ip

Maintenance Allow IP’s Clear #

To clear the list of allowed IP’s you can run:

$ bin/magento maintenance:allow-ips --none

And the result will show:

Set exempt IP-addresses: none

Maintenance Status #

To view the current status of maintenance mode, this will also show you any allowed-ips you might have set, use command:

$ bin/magento maintenance:status

This will output the current maintenance mode, if not active:

Status: maintenance mode is not active
List of exempt IP-addr esses:

or if it is active:

Status: maintenance mode is active
List of exempt IP-addresses:

Mainteneance Mode Disable #

To disabled maintenance mode in Magento you can run the following command:

$ bin/magento maintenance:disable

Result will show:

Disabled maintenance mode

Published: Jun 28, 2019. Updated: September 10, 2020.

Magento 2 Mode

The Magento 2 store can run in different modes, depending on the environment, that can increase speed load.

Magento Security Scan Tool

Magento Security Scan Tool

Magento Security Scan is a tool provided by the Magento team that monitors your Ecommerce store and notifies you of security breaches.

Magento 2 Elasticsearch

Magento 2 Elasticsearch

Magento 2 Elasticsearch tutorial on how to use and configure as the primary search engine.


Magento 2 Theme

Magento 2 Theme Tutorial, what is a theme and how can it be installed, configured or uninstalled in your store


Magento 2 Extension

Magento 2 Extension tutorial, learn what is a Magento 2 Extension how to install or disable in your Magento store.


Magento 2 Sitemap

Magento 2 Sitemap Tutorial on How to Configure a Sitemap, where is the path and how to use in multistore.

Hire us

Need help with Magento 2 Maintenance ?


Technologies we work with

Magento is an open-source e-commerce platform written in PHP
PHP is a popular general-purpose scripting language that is especially suited to web development.
MySQL is an open-source relational database management system.
Redis is an in-memory data structure project implementing a distributed, in-memory key-value database with optional durability.
Varnish is an HTTP accelerator designed for content-heavy dynamic web sites as well as APIs.
Google Tag Manager is a free tool that allows you manage and deploy marketing tags on your website / app
Google Analytics is a web analytics service offered by Google that tracks and reports website traffic
Elasticsearch is a search engine based on the Lucene library.