用FTP工具打开网站根目录,找到wp-config.php

末尾加一段话:

1
2
3
4
if(is_admin()) {
add_filter(‘filesystem_method’, create_function(‘$a’,’return “direct”;’ ));
define(‘FS_CHMOD_DIR’, 0751);
}

以后安装和windows下一样,不会再提示需要FTP用户名密码了。