- Magento Development
- Magento Services
- Industry Solutions
- Hire Magento Developer
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:
magento maintenance:enable [--ip=<ip> ... --ip=<ip>]
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.
create the event.xml on your module under the Vendor/Module/etc/event.xml and...
If you need a custom meta tag for a specific...
Generally, if you load font as preload, it will load...
Step 1: First you need to add di.xml in the...
Override the vendor/magento/module-sales/view/frontend/templates/email/items/order/default.phtml file on your theme and add the...