在网站根目录下执行(针对debian/ubuntu,这俩系统的php-fpm用户名是www-data)
for directories
find . -type d -print0 | xargs -0 chmod 0755
for files
find . -type f -print0 | xargs -0 chmod 0644
chmod 600 wp-config.php
chown -R www-data:www-data *
如果wordpress站点健康检查提示无法自动更新,则执行下面这句,把当前文件夹也加入php-fpm用户组
chown -R www-data:www-data .
本文为“技术点滴”的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。