We will learn how to add custom page design when Maintenance mode is active in Magento 2.
Firstly, make sure your website is in Default or Production mode.
bin/magento deploy:mode:show
Then enable the Maintenance mode by following command
bin/magento maintenance:enable
Once you enable the Maintenance mode following content will show up

Now in this example I will add an image and replace the above content.
You need to open 503.phtml file from following path – magento_root/pub/errors/default/503.phtml
<?php /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ ?> <img width="100%" src="images/maintenance.jpg" alt="">

The images can be uploaded in the image folder in magento_root/pub/errors/default/images folder and style sheets can also be added in magento_root/pub/errors/default/css folders and can be used accordingly.
Happy Coding ! 🙂
Be the first to comment.