To enable maintenance mode in Magento, follow these steps:
  • First, enable Magento command-line interface (CLI)
  • Use SSH to log in to your account
  • Add the syntax
cd ~/public_html
  • Then put the syntax bin/magentomaintenance:allow-ipsxxx.xxx.xxx.xxx
  • Replace xxx.xxx.xxx.xxx with IP address
  • Now put to enable maintenance mode
bin/magentomaintenance:enable
BY Best Interview Question ON 03 Mar 2019