分类
WordPress

wordpress 网站根目录权限设置

网站文件权限设置,在网站根目录下执行

for directories

find . -type d -print0 | xargs -0 chmod 0755

for files

find . -type f -print0 | xargs -0 chmod 0644

for wp-config.php

chmod 600 wp-config.php

如果wordpress站点健康检查提示无法自动更新,则执行下面这两句,把当前文件夹以及所有文件加入php-fpm用户组

chown -R www-data:www-data *
chown -R www-data:www-data .

www-data 是 debian/ubuntu 系统的 php-fpm 默认用户名。