I am getting below error to enabling maintenance mode by adding a file var/.maintenance.flag

Unable to proceed: the maintenance mode is enabled. 0 /vendor/magento/framework/App/Bootstrap.php(256): Magento\Framework\App\Bootstrap->assertMaintenance() 1 /index.php(49): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http)) 2 {main}

Please help me to fix this issue.


Two methods to disable the maintenance mode

Via command line

php bin/magento maintenance:disable

Via the files

Delete var/.maintenance.flag

Official documentation: http://devdocs.magento.com/guides/v2.0/install-gde/install/cli/install-cli-subcommands-maint.html#instgde-cli-maint

  • This not answer to why the exception is thrown – vitoriodachef Jan 15 '19 at 13:58

I think you need to disable maintenance mode

If there is var/.maintenance.flag, Magento 2 maintenance mode is on.

For activating maintenance mode with ip addresses execute below command in CLI

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

the above command will automatically create a .maintenance.flag and .maintenance.ip file under root/var folder.

and .maintenance.ip file contains the above two ip addresses separated by comma.

For ref. http://devdocs.magento.com/guides/v2.0/install-gde/install/cli/install-cli-subcommands-maint.html#instgde-cli-maint

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