1

I want to enable maintenance mode except my ip address, and I have run below command in CLI tool

php bin/magento maintenance:enable --ip= 180.233.1--.1-- (this is my ip) 

this enables the maintenance mode including my system, while I have already excluded my ip.

I don't know why this is not working correctly.

If anyone have idea please let me know.

3
  • Do you have varnish or Cloudflare configured Commented Jul 17, 2019 at 9:49
  • @RajMohanR ,no such services are configured.
    – akgola
    Commented Jul 17, 2019 at 10:05
  • Can you please check in your var directory for maintenance files and for the allowed IP in that file Commented Jul 17, 2019 at 10:28

3 Answers 3

1

Enable maintenance mode except Your IP

bin/magento maintenance:enable

bin/magento maintenance:allow-ips your ip

0

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

Maintenance mode Enable:

php bin/magento maintenance:enable

Maintenance mode Disable:

php bin/magento maintenance:disable

Maintenance mode Enable List of exempt IP-addresses

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

Maintenance mode remove List of exempt IP-addresses

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

Hope it help!

7
  • I am doing in same way but it is not working.
    – akgola
    Commented Jul 17, 2019 at 9:59
  • Is this your IP address 180.233.1 ? Commented Jul 17, 2019 at 10:05
  • my ip something like this 80.233.1--.1--
    – akgola
    Commented Jul 17, 2019 at 10:07
  • What about -- – ? Commented Jul 17, 2019 at 10:08
  • these are number of my ip,I don't want to disclose full IP
    – akgola
    Commented Jul 17, 2019 at 10:10
0

php bin/magento maintenance:enable --ip 192.0.3.26 --ip 192.0.4.27

Your Answer

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

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