Skip to content

Instantly share code, notes, and snippets.

@pagelab
Created October 16, 2013 21:32
Show Gist options
  • Save pagelab/7015250 to your computer and use it in GitHub Desktop.
Save pagelab/7015250 to your computer and use it in GitHub Desktop.
Wordpress Maintenance mode
<?php
/**
* Maintenance WordPress file
*
* Rename this file to .maintenance and
* Wordpress will enter maintenance mode.
*
* It will look for a "maintenance.php"
* file inside wp-contents folder
*
* Allowed IPs: insert you machine IP
* to visit the normal site.
*
*/
$allow = array('201.37.47.79', '177.41.105.163');
if(!in_array($_SERVER['REMOTE_ADDR'], $allow)) {
$upgrading = time();
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment