方法一:
直接修改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); |