但是自己创建了 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.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);