Centos中部署WordPress无法更新问题

前端之家收集整理的这篇文章主要介绍了Centos中部署WordPress无法更新问题前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

wordpress 更新插件 需要ftp用户和密码

但是自己创建了FTP之后,却一直无法连接成功,无法更新

解决的办法是

方法一:

直接修改wordpress配置文件wp-config.php,加上以下代码后就可以在后台正常进行主题插件安装了.

?
1
2
3
@H_301_38@ 4
if (is_admin()) {
add_filter( 'filesystem_method' ,create_function( '$a' PHP plain" style="word-break:break-word; padding:0px!important; margin:0px!important; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.1em!important; outline:0px!important; overflow:visible!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas, 'return "direct";' ));
define( 'FS_CHMOD_DIR' PHP plain" style="word-break:break-word; padding:0px!important; margin:0px!important; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.1em!important; outline:0px!important; overflow:visible!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,0751);
}

方法二:

假设你搭建了ftp,在下面对应的地方填写相应的ftp server信息.

4
5
6
//*added ftp login credentials to avoid the annoying prompt asking for login info every time I wanted to upgrade a plugin*
define(‘FTP_HOST’,‘ftp.yoursite.com’);
define(‘FTP_USER’,‘Your_FTP_Username’);
define(‘FTP_PASS’,‘Your_FTP_password’);
//*If you can use a SSL connection set this to true*
define(‘FTP_SSL’,true);
原文链接:/centos/382049.html

猜你在找的CentOS相关文章