修复 WordPress 的文件读写权限错误

如果在 WordPress Site Health 页面遇到 “Some files are not writable by WordPress”, 可以通过如下的方式解决:
1. 检查 web server 所使用的 user 账号, 比如 nginx:

cat /etc/nginx/nginx.conf
user www-data;
worker_processes auto;
pid /run/nginx.pid;
error_log /var/log/nginx/error.log;
include /etc/nginx/modules-enabled/*.conf;

如上 nginx 所使用的 user 为 www-data .
2. 将 WordPress 的文件 Owner 更改成 web server user, 比如:

chown -R www-data:www-data /the/folder/place/the/wordpress/

重新刷新页面即可。
-EOF-