Let’s initiate a discussion!!
In this post, we will discuss how can one enable Maintenance Mode in Magento 2.
It’s a good practice to set Maintenance mode while you are making changes on live site.
In order to put your Magento 2 site in maintenance mode, you need to create an empty .maintenance.flag file and upload it in var folder at the root of Magento Source.
If var/.maintenance.flag does not exist then the website operates normally, and maintenance mode is OFF.
Once you upload .maintenance.flag file to var folder, maintenance mode is on.
You can also verify var/.maintenance.ip file because it contains the list of the IPs that granted access to the website.
Below are some commands that help us to enable/disable maintenance mode:
1 2 3 4 |
magento maintenance:status magento maintenance:enable magento maintenance:enable [--ip=<ip> ... --ip=<ip>] magento maintenance:disable |
where –ip= is an IP address to exempt from maintenance mode (for example, developers/ store owner doing the maintenance). To exempt more than one IP address in the same command, use the option multiple times.
For Ex. : magento maintenance:enable –ip=xxx.xxx.xx.x
magento maintenance:status displays the current status of maintenance mode.
That’s it. I think it is very simple.
[crayon-641f07447abdd510782857/] Using above fucntion Images can be imported directly from...
Override view block using di.xml and add the below code...
You can check a list of called layout XML for...
Follow the below steps to install and set up PWA...
If you want to remove all leading zero's from order,...
Let our Magento expert connect to discuss your requirement.
We offer Magento
certified developers.
Our Magento clientele
is 500+.
We sign NDA for the
security of your projects.
We’ve performed 100+
Magento migration projects.
Free quotation
on your project.
Three months warranty on
code developed by us.