3

我的 Wordpress 网站在 Apache 上运行并安装了w3-total 缓存插件。要启用页面缓存,它希望我为 w3tc-config 和缓存文件夹设置 777 权限。

它显示以下警告。

Execute next commands in a shell:
chmod 777 {MyDirectory}/wp-content/cache
chmod 777 {MyDirectory}/wp-content/w3tc-config

它安全吗?有解决方法吗?

4

1 回答 1

3

如果您使用的是 W3C Total Cache,您应该这样做:

chmod 777 wp-content/w3tc-config
chmod 777 wp-content/cache

rm -rf wp-content/cache/config
rm -rf wp-content/cache/object
rm -rf wp-content/cache/db
rm -rf wp-content/cache/minify
rm -rf wp-content/cache/page_enhanced

在这种情况下,每次清除缓存时w3tc都需要重新生成缓存,所以需要写权限。

于 2016-11-29T11:06:06.633 回答