How to Add Custom Page Design in Maintenance Mode in Magento 2?

Today, we’re going to teach you guys how to add a custom page designing in the Magento 2 maintenance mode.

Learning this is extremely useful as many times you’ll have to work on upgrading your store. And it’s not ideal to use a basic message that looks like there’s a huge issue with your online store.

For example, when Apple launches new products, they always put their website into maintenance mode with a custom page that informs new products are on the way.

And by doing so, they successfully create hype for their new products while they upgrade their store for new products.

Similarly, you can also put your Magento 2 store into maintenance mode with a custom pages design for any upgrade you’re planning to make.

In this tutorial, we will show you exactly how to add a custom page design in Magento 2 maintenance mode.

How to Create a Custom Maintenance Page in Magento 2?

Please follow the below steps to create a custom Magento 2 maintenance page.

Step 1.

In order to add a custom page design in maintenance mode, first, you need to find out if your Magento 2 store is in default mode, production mode, or maintenance mode.

To find out, you need to execute the below command:

bin/magento deploy:mode:show

Step 2.

If your Magento 2 store is in either Default mode or Production mode, then you need to execute the following command to enable the Maintenance mode.

bin/magento maintenance:enable

Once the maintenance mode is enabled, you’ll see a page like the below image when you try to access your Magento 2 store.

Default maintenance page look

Step 3.

Next, open 503.phtml file from the magento_root/pub/errors/default/ folder and paste the following code:

<?php

/**

 * Copyright © Magento, Inc. All rights reserved.

 * See COPYING.txt for license details.

 */

?>

<img width="100%" src="images/maintenance.jpg" alt="">

Step 4.

Lastly, save the file, open a web browser, & access your Magento 2 store and you’ll see a custom design page when your Magento 2 store is in Maintenance mode.

Magento 2 custom maintenance page

Wrapping Up

And that’s it!

This is how you can add a custom page design to your Magento 2 Maintenance mode.

And if you need our professional assistance, feel free to contact us anytime.