Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email

Magento Forum

Admin Access in Maintenance mode. 
Jr. Member
Total Posts:  1
Joined:  2011-08-09

Hi ,

I am using magento community edition ver .
I like to add a welcome page in my site until I developed the whole site.
I got plugin for maintenanace mode which helps me to put simple html code.
I wants to have a integrated form which gets saved in database.

I also tried with magento’s root maintenance.flag file. but if i add it I am also not able to access admin. I can give access with IP but i wants to have admin access from different places. Which i am not able to do.
I have tried to change code of index file to check the admin login. But it gives me error. Below is my code.

$mageFilename MAGENTO_ROOT '/app/Mage.php';
$maintenanceFile 'maintenance.flag';

if (!
file_exists($mageFilename)) {
if (is_dir('downloader')) {
("Location: downloader");
else {
echo $mageFilename." was not found";
require_once $mageFilename;
//require 'app/Mage.php';
Mage::getSingleton('core/session', array('name' => 'adminhtml'));
//verify if the user is logged in to the backend


if (

include_once $maintenanceFile;

else if(!strpos($path'admin'))
include_once $maintenanceFile;



#ini_set('display_errors', 1);


/* Store or website code */
$mageRunCode = isset($_SERVER['MAGE_RUN_CODE']) ? $_SERVER['MAGE_RUN_CODE''';

/* Run store or run website */
$mageRunType = isset($_SERVER['MAGE_RUN_TYPE']) ? $_SERVER['MAGE_RUN_TYPE''store';

Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top