
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 1.1.1.1
where 1.1.1.1
is the IP allowed to bypass.
And the mode will be show as:
Set exempt IP-addresses: 1.1.1.1
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 2.2.2.2
Result will be a list of all the previouse set IPs with the new addition last:
Set exempt IP-addresses: 1.1.1.1 2.2.2.2
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: 1.1.1.1
or if it is active:
Status: maintenance mode is active
List of exempt IP-addresses: 1.1.1.1
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
Magento 2 Mode
The Magento 2 store can run in different modes, depending on the environment, that can increase speed load.
ReadMagento 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.
ReadMagento 2 Elasticsearch
Magento 2 Elasticsearch tutorial on how to use and configure as the primary search engine.
ReadMagento 2 Theme
Magento 2 Theme Tutorial, what is a theme and how can it be installed, configured or uninstalled in your store
ReadMagento 2 Extension
Magento 2 Extension tutorial, learn what is a Magento 2 Extension how to install or disable in your Magento store.
ReadMagento 2 Sitemap
Magento 2 Sitemap Tutorial on How to Configure a Sitemap, where is the path and how to use in multistore.
Read