如何将magento投入维护

Jus*_*mac 16 magento webshop magento-1.4

是否可以将magento站点置于维护标志下,以便访问者收到该站点正在建设中的消息?我在管理区域中找不到此设置.

另一种解决方案也将受到欢迎.

任何帮助,将不胜感激.

谢谢.

Dak*_*ika 29

要在Magento中启用维护模式,只需在Magento商店的根目录中创建空的maintenance.flag文件.


clo*_*eek 23

我常常使用它.http://inchoo.net/ecommerce/magento/maintenance-mode-in-magento/

重要的是:

打开:index.php在root和57行之上添加(记住编辑'allowed'数组以包含你希望能够访问该站点的IP);

$ip = $_SERVER['REMOTE_ADDR'];
$allowed = array('1.1.1.1','2.2.2.2'); // these are the IP's that are allowed to view the site.
Run Code Online (Sandbox Code Playgroud)

然后换行

if (file_exists($maintenanceFile)) {
Run Code Online (Sandbox Code Playgroud)

if (file_exists($maintenanceFile) && !in_array($ip, $allowed)) {
Run Code Online (Sandbox Code Playgroud)


小智 11

只需在您的根目录中添加一个名为maintenance.flag的空白文件即可完成工作

更简洁的解决方案是使用此扩展.

它允许您设置存储,以便一旦登录到后端,您就可以访问前端+其他一些简洁的功能


ope*_*org 6

这就是我添加到索引中的内容,以便能够继续使用不同的IP:

//EGS to show a maintenance page but be able to work
$ip = $_SERVER['REMOTE_ADDR'];

// these are the IP's that are  allowed to view the site:
$allowed = array('111.111.111.111', '222.222.222.222');

if (file_exists($maintenanceFile) && !in_array($ip, $allowed)) { 
    include_once dirname(__FILE__) . '/errors/503.php';
    exit;
}
Run Code Online (Sandbox Code Playgroud)