安装主题和插件的时候,就是这个恶心的报错,
Wordpress plugin install: Could not create directory
这是权限惹的祸,解决方案:
1、进入wp安装目录:
chmod 777 wp-content
2、chown -R www:www wp_dir
#wp_dir改成wordpress的安装目录即可
以下为backup
sudo chown -R www:www wp-content/themes
sudo chown -R www:www wp-content/plugins
sudo chmod 757 wp-content
sudo chmod 757 wp-content/themes
sudo chmod 757 wp-content/plugins
sudo chmod 757 default
正在运行的 Web 服务器进程的用户和组:运行以下命令来查看正在运行的 Web 服务器进程的用户和组。
对于 Apache:
ps aux | grep apache
对于 Nginx:
ps aux | grep nginx