My magento installation has integration with a ERP that uses multiple IPs to connect to it that keep changing. This makes it very difficult to develop the webshop in maintenance mode. How can I let magento 2.4 in maintenance mode while also allowing ERPs to perform their needed API calls?

2 Answers 2


You can disable maintenance mode for IP exempt IP-addresses enable disable for using the below command.

Maintenance mode Enable List of exempt IP-addresses

php bin/magento maintenance:enable --ip= --ip=

Maintenance mode remove List of exempt IP-addresses

php bin/magento maintenance:disable --ip=none

I hope this will help you.


  • Unfortunately it doesn’t. The ERP server IP doing the call keeps changing. Sep 30, 2020 at 10:20
  • Furthermore I also explained in my question that I an IP-based maintenance mode is the problem. I didn’t mean that I wanted to add more IPs to the list, I meant that I need have something else than IP checks. Oct 5, 2020 at 14:03

Try to add a PHP env variable MAGE_REQUIRE_MAINTENANCE = null to bypass the maintenance assertion completely;

For more detail, please read \Magento\Framework\App\Bootstrap::assertMaintenance

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.