1

If I switch my store to maintenance mode, then I get so see this page:

1 exception(s):
Exception #0 (Exception): Unable to proceed: the maintenance mode is enabled. 

Exception #0 (Exception): Unable to proceed: the maintenance mode is enabled. 
<pre>#1 Magento\Framework\App\Bootstrap->run(&Magento\Framework\App\Http\Interceptor#000000001f0deaee00000000184ccfc2#) called at [pub/index.php:45]
</pre>

How can I show a custom CMS Site or HTML Site instead?

1 Answer 1

3

When switching to the maintenance mode and developer mode is enabled, it will show the below message instead of 503 - Service Temporarily Unavailable page. The error message returns from the function assertMaintenance() from the file /var/www/html/magento/vendor/magento/framework/App/Bootstrap.php

1 exception(s):
Exception #0 (Exception): Unable to proceed: the maintenance mode is enabled. 

Exception #0 (Exception): Unable to proceed: the maintenance mode is enabled. 
<pre>#1 Magento\Framework\App\Bootstrap->run(&Magento\Framework\App\Http\Interceptor#000000001f0deaee00000000184ccfc2#) called at [pub/index.php:45]
</pre>

If you switched to the default or production mode from developer mode then it will show the 503 error message page (/var/www/html/magento/pub/errors/default/503.phtml)

<?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>

You can customize HTML of the 503.phtml page as per your requirement.

Hope this helps!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.