×
Melbourne Magento and BigCommerce experts
Melbourne Magento and BigCommerce experts
  • Home
  • About
  • Services
  • B2B Packages
  • Case Studies
  • Blog
Contact
Melbourne Magento and BigCommerce experts
×
  • Home
  • About
  • Services
  • B2B Packages
  • Case Studies
  • Blog
  • Contact
Magento
 / 
Magento Maintenance Mode – how and when to use
Magento Maintenance Mode – how and when to use
Alexander L.
  |  
November 25,2014
  |  
Magento
  |  
Comments

Magento maintenance mode hero graphic

What is Magento Maintenance mode

Sometimes you need to keep your online store not available for visitor, for example when you do major updates like apply new design/theme and don’t want your customers to see something weird on your website. Magento has built-in feature to handle this situation, so it is quite simple to organize. So no need to play with htaccess, create a temp index file and think about what happens if a customer visits deep link to internal page.

Click here to find out how Magenable can provide you with high quality Magento support and maintenance service

How to set Magento in maintenance mode

To set Magento in maintenance mode you need to create a file with name “maintenance.flag” and drop it to Magento home directory. While this file exists your website visitors will see a temporary page (/errors/503.php). If you want to edit this page content you can find it in Magento admin – CMS/Pages, it is called “503 Service Unavailable”.

Once you finished with changes and your website is ready to work just delete maintenance.flag file and maintenance mode will be off, so your Magento website will work as usual.

Note that before you disable maintenance mode you can’t access Magento admin either, but don’t panic if it isn’t what you want, check the next section.

Can me and my team see the Magento website while it is in maintenance mode?

Wouldn’t it be good to give your team an ability to see your website while it is in maintenance mode?  Fortunately there is a way to organize it with a little tweak of index.php file in your home directory.

Add the next code:

$ip = $_SERVER[‘REMOTE_ADDR’];

$allowed = array(‘1.1.1.1′,’2.2.2.2’); // allowed IPs – list there IP addresses of your offices/employees

 

Next find a line:

if (file_exists($maintenanceFile)) {

and change it to:

if (file_exists($maintenanceFile) && !in_array($ip, $allowed)) {

After that change your team (with IP addresses listed as allowed IPs can access the website, while other visitors will see 503 Service Unavailable page.

Disclaimer

While we try our best to prepare accurate recommendations, it isn’t guaranteed that they will work flawlessly in your particular Magento install, so make all pre-cautions before trying it and share your experience with others in the comments to this post.

References

  1. Inchoo blog “A better maintenance mode for Magento“
  2. Stack Exchange
    • http://magento.stackexchange.com/questions/24389/1-9-0-1-maintenance-mode
    • http://magento.stackexchange.com/questions/31840/how-do-i-enable-version-1-9-maintenance-flag-with-admin-access

Do you need Magento maintenance and support service for your online store?

We provide one from $995 (plus GST) per month, check Support and Maintenance page for details.

Categories
AllAIBigCommerceData scienceMagentoMarketingNewsResearchesTutorialUser Experience
Related Posts
Melbourne Magento and BigCommerce experts
Five quick wins for your online store using AI
January 29, 2025 3:38 PM
Melbourne Magento and BigCommerce experts
Enhancing Magento PageBuilder with a Responsive Slider Extension
January 16, 2025 11:54 AM
Melbourne Magento and BigCommerce experts
Introducing Our Latest Magento Extension: AI powered chatbot
January 15, 2025 7:35 PM
Tags
advertisingAustraliaAverage Order VolumeB2BB2B ecommerceBigCommerceConversionDemandwareecommerceHybrisIBM Websphere Commercelanding pagesMagentomagento 1.X EOLMagento 2Magento CommunityMagento EnterpriseMagento MarketplaceMelbournemigrationmobileonline marketingopen-sourceOracleperformance optimisationresearchessearchshippingShopifysite searchSocialsocial mediaUXzoey

Ready to discuss your project?

We look forward to hearing from you.

Get in touch
Melbourne Magento and BigCommerce experts

Magento & Bigcommerce Experts.

Level 1, 10 Dorcas St, South Melbourne
VIC 3205, Australia
Telephone: +61 (0)3 9015 4624
Email: [email protected]
Subscribe to get the latest ecommerce News and updates.Subscribe on Substack
  • Home
  • About
  • Services
  • B2B Packages
  • Case Studies
  • Blog
TwitterLinkedInGithub

Copyright © 2025  Magenable  Privacy Policy  |  Disclamer