解决"要执行请求的操作,WordPress需要访问您网页服务器的权限"

来源:互联网 发布:手机数据备份怎么弄 编辑:程序博客网 时间:2024/06/08 10:40
第一、授权目录


chown -R www-data /home/wwwroot/html

chown -R apache /home/wwwroot/html

chmod -R 775 /home/wwwroot/html

chmod -R 777 /home/wwwroot//html/wp-content/


 


第二、修改wp-config.php文件


define("FS_METHOD", "direct");
define("FS_CHMOD_DIR", 0777);
define("FS_CHMOD_FILE", 0777);
在wp-config.php文件最后添加上面三行。


这样,我们在到wordpress后台下载插件、主题安装都没有问题。


如果下载插件失败可以在wp.config.php里加上如下代码: 
define('WP_TEMP_DIR', ABSPATH . 'wp-content/plugins');



0 0
原创粉丝点击