要更新wordpress,请在wp配置中定义以下常量。php文件
define(\'FS_METHOD\', \'direct\');
define( \'FS_CHMOD_DIR\', 0777 );
define( \'FS_CHMOD_FILE\', 0777 );
define(\'FTP_BASE\', \'/var/www/test/\');//project directory
define(\'FTP_CONTENT_DIR\', \'/var/www/test/wp-content/\'); //define wp-content directory path
define(\'FTP_PLUGIN_DIR \', \'/var/www/test/wp-content/plugins/\'); //define plugins directory path
define( \'WP_AUTO_UPDATE_CORE\', true );
//define ftp details
define(\'FTP_USER\', \'test\');
define(\'FTP_PASS\', \'test@123\');
define(\'FTP_HOST\', \'ftp.test.com\');
希望这能帮助你解决你的问题。