Enable or disable maintance mode - Magento 2
The Magento application have option to make site in maintance mode during maintaining, upgrading, or reconfiguring our site.
Magento detects maintenance mode as follows:
If var/.maintenance.flag
does not exist, maintenance mode is off and Magento operates normally. Otherwise, maintenance mode is on unless var/.maintenance.ip
exists:
The var/.maintenance.ip
can contain a list of IP addresses. If an entry point is accessed using HTTP and the client IP address corresponds to one of the entries in that list, then maintenance mode is off.
Add allowed IP during maintanace mode
php bin/magento maintenance:allow-ips xxx.xxx.xxx.xxx
Enable maintanace mode
php bin/magento maintenance:enable
Disable maintance mode
php bin/magento maintenance:disable
Looking for a skilled WordPress/WooCommerce developer? I'm currently available for freelance, contract, or full-time remote opportunities! Let's create something amazing together. Send me a quick message, and I'll respond within 24 hours!
Recent Posts
- Scaling WordPress - How Custom Database Tables Solve the Post Meta Bottleneck
- WordPress Transients Explained - A Developer's Guide to Site Performance
- Behind the Click - The Hidden Journey of Your Web Requests
- Automating Code Linting with GitHub Actions for WordPress Plugins
- Comprehensive Guide to Linting PHP, JavaScript, and CSS in WordPress Plugins Using Composer
Your Questions / Comments
If you found this article interesting, found errors, or just want to discuss about it, please get in touch.