Site icon MageComp Blog

How to Set the Maintenance Mode page in Magento 2?

How to Custom Maintenance mode Page in Magento 2

Hello Magento folks,

Welcome to the Magento Tutorial Blog. Today I am here to help you in How to Custom Maintenance mode Page in Magento 2. Also, go through our last published blog How To Hide Add To Cart Button in Magento 2. Let’s get in.

Introduction:

Mainly, all the store owners will choose to hide their maintenance activities from their customers. For many reasons, the customer can feel insecure or might get irritated if they see an under-construction site. So, to overcome this problem the Magento provides an inbuilt feature of making your site into Maintenance mode. Here, in the Maintenance mode, the Magento 2 closes the store for the visitors. Let’s learn How to Custom Maintenance mode Page in Magento 2.

Steps to Custom Maintenance mode Page in Magento 2:

Step 1: Go to the pub/error folder then rename local.xml.sample to local.xml file: 

 <?xml version="1.0"?>
<!--
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<config>
    <skin>magecomp</skin>  <!-- Add your custom folder name  -->
    <report>
        <!--
            "action" can be set to "print" to show exception on screen and "email"
            to send exception on specified email
        -->
        <action>print</action>
        <!--
            in "subject" you can set subject of email
        -->
        <subject>Store Debug Information</subject>
        <!--
            "email_address" admin email address
        -->
        <email_address></email_address>
        <!--
            "trash" is handle about trace info
            value "leave" is for store on disk
            value "delete" is for cleaning
        -->
        <trash>leave</trash>
    </report>
</config>

Step 2: Now copy the default folder and rename it. Give name magecomp because we add this name on skin tag in local.xml

Step 3: Now go to magecomp folder and open 503.phtml and add your custom code and design to show custom maintenance page

<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
?>

<h1>Service Temporarily Unavailable</h1>
<p>
    The server is temporarily unable to service your request due to maintenance downtime or capacity problems.
    Please try again later.      
</p>

Step 4: Refresh the page. 

Final Words:

Hence, after the implementation of the above steps, you will be able to set up a Custom Maintenance mode Page in Magento 2. Make your customer experience better by applying the Custom Maintenance mode Page in your Magento 2 store.

To avoid the above steps, integrate Magento 2 Maintenance Page Extension to painlessly display a user-friendly maintenance page with a countdown-timer.

Tell us at MageComp Support in case of any difficulties in the above solution. Don’t forget to share with your Magento fellas and also share your appropriate reviews in the comment section below.

Happy Coding.

Exit mobile version