WordPress - WP Super Cache无法在wp-config上写入

时间:2017-11-02 07:09:41

标签: wordpress centos7 vps

将所有WordPress权限更改为777并将其分配给apache组:apache仍然是Wp Super Cache插件无法更改wp-config.php

我不知道为什么!

我的服务器是:

CentOS 7

PHP 71

的Apache

MariaDB的

Apache错误日志:

[Thu Nov 02 02:01:45.637165 2017] [php7:warn] [pid 17633] [client 5.202.27.148:25292] PHP Warning:  include(): Failed opening '/var/www/html/wp-content/plugins/wp-super-cachewp-cache-base.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/wp-content/plugins/wp-super-cache/wp-cache.php on line 72, referer: http://website.com/wp-admin/post.php?post=10821&action=edit

Wordpress错误:

Warning! You must set WP_CACHE and WPCACHEHOME in your wp-config.php for this plugin to work correctly: define( 'WP_CACHE', true ); 
define( 'WPCACHEHOME', '/var/www/html/wp-content/plugins/wp-super-cache' );

2 个答案:

答案 0 :(得分:0)

这是对的。 wp-config应该只能由用户手动写入。此文件不应使用代码写入。请将这些配置手动放在wp-config.php中。

答案 1 :(得分:0)

我的问题通过禁用SELinux来解决,这会阻止apache用户编辑文件和文件夹。