Magento module to enable maintenance mode viewing by parameter key.
Instead of creating a file at var/.maintenance.ip
with the list of IP addresses to allow in maintenance mode, instead create a file at var/.maintenance.key
to allow access by list of allowed keys. This allows developers with dynamic or changing IP addresses to access Magento while the site is in maintenance mode.
composer require markoshust/magento-module-maintenance-key
- Create the file:
./var/.maintenance.key
- This file should contain a comma-delimited list of keys, for example:
67BBB06F-7C54-48E0-A124-44DC22649809,883233B6-8756-460D-A3D2-8C901C21FCE7
- If the site contains the file
./var/.maintenance.flag
, the site will be deemed in maintenance mode. - The site can now be accessed by appending the
MAINTENANCE_KEY
parameter with a value allowed in the./var/.maintenance.key
file, for example::http://mysite.com/?MAINTENANCE_KEY=67BBB06F-7C54-48E0-A124-44DC22649809
- If the
./var/.maintenance.key
file does not exist, maintenance mode viewing will fallback to default methods.
Use the Requestly browser plugin to auto-append the MAINTENANCE_KEY
parameter to a site's URL.