How to put your magento site into maintainance mode for everyone but you
Occasionally you may need to lock customers out of your site. This may be so you can work on a new UI or because something has gone wrong and you need to fix it before someone sees it. However, it would be good if you can still see the site so that you can check your own progress.
All you need to do to put magento into maintainance mode is to create a new file called
maintenance.flag
in the root.. and err that’s it
If you dont want to freeze yourself out you can edit index.php
around line 57 add
$ip = $_SERVER['REMOTE_ADDR'];
$allowed = array('xxx.xxx.xxx.xxx','xxx.xxx.xxx.xxx');
( where xxx.xxx.xxx.xxx is your ip addresses. )
then change the line
if (file_exists($maintenanceFile)) {
to
if (file_exists($maintenanceFile) && !in_array($ip, $allowed)) {
you can see the site and anyone else will get maintenance.

Nice tip, thanks. Question though – what do the visitors see when they try to access the site in maintenance mode? Can you present a custom holding page somehow?