简体   繁体   English

WP Super Cache 缓存损坏

[英]WP Super Cache caching broken

I am having an ambiguous error.我有一个不明确的错误。 The path in the error is correct:错误中的路径是正确的:

Warning!警告! WP Super Cache caching broken! WP Super Cache 缓存坏了! The script advanced-cache.php could not load wp-cache-phase1.php.脚本 advanced-cache.php 无法加载 wp-cache-phase1.php。

Please edit /wp-content/advanced-cache.php and make sure the path to /wp-content/plugins/wp-super-cache/wp-cache-phase1.php is correct.请编辑 /wp-content/advanced-cache.php 并确保 /wp-content/plugins/wp-super-cache/wp-cache-phase1.php 的路径正确。

What needs to be fixed?需要修复什么?

The problem is that the constant is not defined until after the plugin loads.问题是在插件加载之后才定义常量。 This error is possible if the line "require_once(ABSPATH . 'wp-settings.php');"如果行“require_once(ABSPATH .'wp-settings.php');”,则可能出现此错误is present in wp-config.php .存在于 wp-config.php 中。 WPCACHEHOME is probably being defined after this line, but needs to be defined above it: WPCACHEHOME 可能在此行之后定义,但需要在其上方定义:

define( 'WPCACHEHOME', '<site root>/wp-content/plugins/wp-super-cache/' ); //Added by WP-Cache Manager
require_once(ABSPATH . 'wp-settings.php');

This is a permission issue, U should check that the paths mantioned in the error notice have 777 permisions, BUT, my advice on this issue is simply to NOT use this plugin, I had it installed on some of my site, and almost in all of them it caused errors on diffrent elements on my site.这是一个权限问题,你应该检查错误通知中提到的路径是否有 777 个权限,但是,我对这个问题的建议只是不要使用这个插件,我在我的一些网站上安装了它,几乎所有其中,它导致了我网站上不同元素的错误。 I'm not saying that using this plugin will cause problems for sure, but this plugin is known as problematic, and for my opinion it doesn't justify itself.我并不是说使用这个插件肯定会导致问题,但是这个插件被称为有问题,在我看来它并不能证明自己是正确的。

Please use this in your wp-config.php file请在您的 wp-config.php 文件中使用它

define('WPCACHEHOME', dirname(__FILE__) . '/wp-content/plugins/wp-super-cache/');

before

/** Absolute path to the WordPress directory. */
if ( !defined('ABSPATH') )
define('ABSPATH', dirname(__FILE__) . '/');

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM