Skip to content

Instantly share code, notes, and snippets.

@Marko-M
Last active February 21, 2017 17:56
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save Marko-M/589d584b81fce3c0f66d to your computer and use it in GitHub Desktop.
Save Marko-M/589d584b81fce3c0f66d to your computer and use it in GitHub Desktop.
Activate maintenance mode on Magento 2 w/ IP address exclusion list
#!/bin/bash
# Comma separated list of IPs to be excluded
echo "123.123.123.123,234.234.234.234">var/.maintenance.ip
# For the rest of the world we go down for maintenance NOW
touch var/.maintenance.flag
@ronaldkubo
Copy link

Thanks! Clear and to the point, I understood this a lot quicker than the actual doc at http://devdocs.magento.com/guides/v2.0/install-gde/install/cli/install-cli-subcommands-maint.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment