Skip to content

Simple template for magento errors and maintenance mode

Notifications You must be signed in to change notification settings

reillo/mage_maintenance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Magento Maintenance Template

Simple template for magento maintenance mode and allow white listed ip to access the site when maintenance mode.

Simple Magento Maintenance Template

Installation

  • Download zip files
  • Extract files at your magento installation
  • For white listed ip addresses. Replace or backup your original index.php then use and rename the index.php.simple to index.php.
  • or, use and insert the code below in your index.php for whitelisted ip
/**
 * Maintenance mode
 * note! insert me after `define('MAGENTO_ROOT', getcwd());`
 */
$allowed_ip = array('127.0.0.12', '60.241.193.31');
if (file_exists(MAGENTO_ROOT.'/maintenance.flag') && !in_array($_SERVER['REMOTE_ADDR'], $allowed_ip)) {
	include_once __DIR__.'/errors/503.php';
	exit();
}

License

This project is open-sourced software licensed under the MIT license.

About

Simple template for magento errors and maintenance mode

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published