wordpress总提示输入ftp账号

解决方法一
可以在wp-config.php里加入下面代码:

1define("FS_METHOD","direct");
2define("FS_CHMOD_DIR", 0777);
3define("FS_CHMOD_FILE", 0777);

解决方法二

在wp-config.php中找到如下代码:

1require_once(ABSPATH .'wp-settings.php');

在上面代码后面添加以下代码:

1if(is_admin()) {
2add_filter('filesystem_method', create_function('$a','return "direct";'));
3define('FS_CHMOD_DIR', 0751);
4}

解决方法三

拷贝下面的代码到wp-config.php中的?>之前

1/** Override default file permissions */
2if(is_admin()) {
3add_filter('filesystem_method',create_function('$a','return "direct";'));
4define('FS_CHMOD_DIR', 0751);
5}

解决方法四

修改FTP相关信息之后,拷贝代码到wp-config.php的?>之前

1//*added ftp login credentials to avoid the annoying prompt asking for login info every time I wanted to upgrade a plugin*
2define('FTP_HOST','ftp.yoursite.com');
3define('FTP_USER','Your_FTP_Username');
4define('FTP_PASS','Your_FTP_password');
5//*If you can use a SSL connection set this to true*

6define('FTP_SSL', true);

转载于:https://www.cnblogs.com/mc-r/p/11632722.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值