WordPress 5.4.2 版本后台訪問速度慢,糾結了一晚上暫時找到的解決辦法如下:
第1步:
在wp-admin/includes路徑下,找到admin.php,在內容最底下加入以下代碼:
add_filter('automatic_updater_disabled', '__return_true'); // 徹底關閉自動更新
remove_action('init', 'wp_schedule_update_checks'); // 關閉更新檢查定時作業
wp_clear_scheduled_hook('wp_version_check'); // 移除已有的版本檢查定時作業
wp_clear_scheduled_hook('wp_update_plugins'); // 移除已有的插件更新定時作業
wp_clear_scheduled_hook('wp_update_themes'); // 移除已有的主題更新定時作業
wp_clear_scheduled_hook('wp_maybe_auto_update'); // 移除已有的自動更新定時作業
remove_action( 'admin_init', '_maybe_update_core' ); // 移除后台內核更新檢查
remove_action( 'load-plugins.php', 'wp_update_plugins' ); // 移除后台插件更新檢查
remove_action( 'load-update.php', 'wp_update_plugins' );
remove_action( 'load-update-core.php', 'wp_update_plugins' );
remove_action( 'admin_init', '_maybe_update_plugins' );
remove_action( 'load-themes.php', 'wp_update_themes' ); // 移除后台主題更新檢查
remove_action( 'load-update.php', 'wp_update_themes' );
remove_action( 'load-update-core.php', 'wp_update_themes' );
remove_action( 'admin_init', '_maybe_update_themes' );
第2步:
在wp-admin/includes路徑下,找到translation-install.php,將內容的第59行代碼注釋掉 “// $request = wp_remote_post( $url, $options );”