php - WordPress - PHP 警告无法打开流 : No such file or directory (advanced-cache. php)

标签 php wordpress caching warnings

我在后端和前端页面 (WordPress) 上收到此 PHP 警告,但不知道如何解决:

Warning: include(/home/.../public_html/wp-content/advanced-cache.php): failed to open stream: No such file or directory in /home/.../public_html/wp-settings.php on line 84

Warning: include(): Failed opening '/home/.../public_html/wp-content/advanced-cache.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/.../public_html/wp-settings.php on line 84

确实,该目录中没有 advanced-cache.php(不确定是否曾经有过),但完全相同的配置在不同的服务器上运行时没有警告。

将不胜感激任何帮助。谢谢。

最佳答案

我想你已经安装了Advance cache plugin,并且设置了WP_CACHE

define('WP_CACHE', true);
// or may be it is a file like, if so then comment this line,
// below is the statement which need to be commented
// define('WP_CACHE', is_file(__DIR__.'/wp-content/advanced-cache.php'));

为了防止这个错误你可以设置为false,比如

define('WP_CACHE', false);

关于php - WordPress - PHP 警告无法打开流 : No such file or directory (advanced-cache. php),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43406007/

相关文章:

php - Joomla 安装期间无法连接到 mySQL 数据库

android - 使用 Wordpress 数据时遇到问题

javascript - 如何将静态古腾堡 block 转换为动态 block 并使用 PHP 注册它?

php - Wordpress 分页翻译

java - 如何比较各种缓存框架的速度?

php - 使用 PHP 和 MySQL 缓存调整大小的图像的最佳方法

php - 用 PHP 发送确认电子邮件

php - PHP 如何管理加载到内存中的函数?

php - 在 PHP 中执行 PUT 请求后如何重用 cUrl 上下文?

ruby-on-rails - 正在缓存旧的 ActionMailer 模板?