Centos部署WordPress无法更新问题的解决方法
wordpress更新插件需要ftp用户和密码。但是自己创建了FTP之后,却一直无法连接成功,无法更新。解决的办法是:
方法一:
直接修改wordpress配置文件wp-config.php,加上以下代码后就可以在后台正常进行主题、插件安装了。
if(is_admin())
{
add_filter('filesystem_method',
create_function('$a','return
"direct";'
));
define('FS_CHMOD_DIR',
0751);
}
方法二:
假设搭建了ftp,在下面对应的地方填写相应的ftp server信息。
//*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.域名’);
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);
版权声明:本文由 鹿泽笔记 原创发布。
本文链接:https://www.bailuze.com/9825.html
许可协议:本文标题《Centos部署WordPress无法更新问题的解决方法》,转载请注明文章出处及原始链接。
