How to enable maintenance mode for frontend only.

I used php bin/magento maintenance:enable

but it close both frontend and backend .


If yow want to prevent customers to use the site while you carry on making changes in the admin you could whitelist your IP(s):

$ bin/magento maintenance:enable --ip="{your-ip-here}"

php bin/magento maintenance:enable --ip="{your-ip-here}" works

actually, it allows to get access of that particular IP user, it does not like frontend down and admin work but it allows both.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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