解决WordPress安装/升级插件时提示输入FTP用户名和密码问题

博客运维评论7,321

方法一:文章源自HAM小站-https://bh8sel.com/3690.html

在“wp-config.php”最后面添加以下代码解决问题:文章源自HAM小站-https://bh8sel.com/3690.html

define("FS_METHOD","direct");
define("FS_CHMOD_DIR", 0777);
define("FS_CHMOD_FILE", 0777);

同时解决安装插件提示“无法定位wp-content目录”问题。文章源自HAM小站-https://bh8sel.com/3690.html

(为了更加安全建议升级完成删除以上三句)文章源自HAM小站-https://bh8sel.com/3690.html

方法二:文章源自HAM小站-https://bh8sel.com/3690.html

如果安装的是lnmp一键安装包,可以使用授权组来解决,以便Apache/Nginx可以有权限覆盖掉旧文件。文章源自HAM小站-https://bh8sel.com/3690.html

登录SSH输入以下命令:文章源自HAM小站-https://bh8sel.com/3690.html

chown -R www /home/wwwroot/bh8sel.top(修改成网站域名目录)

其中/home/wwwroot/bh8sel.top是你的Wordpress的安装目录。文章源自HAM小站-https://bh8sel.com/3690.html 文章源自HAM小站-https://bh8sel.com/3690.html

 最后更新:2020-8-31
匿名

发表评论

匿名网友
:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:
确定

拖动滑块以完成验证