How to put magento in maintenance

后端 未结 13 1171
北海茫月
北海茫月 2021-02-01 21:45

Is it possible to put a magento site under an maintenance flag so that visitors will get a message that the site is under construction? I can\'t find this setting in the admin a

13条回答
  •  忘掉有多难
    2021-02-01 22:36

    I followed this tutorial http://magentoexplorer.com/how-to-show-and-customize-magento-maintenance-mode-page to enable maintenance mode page in Magento, you need to create and upload maintenance.flag file to Magento root folder, however there are some more step for a good Maintenance mode like.

    1. Add exception during maintenance (allow specific IP to visit your site during maintenance). In index.php, add these lines

      $ip = $_SERVER['REMOTE_ADDR']; $allowed = array('x.x.x.x','y.y.y.y');

    2. Edit maintenance mode page Edit maintenance mode page in /errors/default/503.phtml Remove wrap in /errors/default/page.phtml

    Hope this helps.

提交回复
热议问题