Making Wordpress faster is an ongoing experiment. There's a few more things I've discovered which can be removed for small (albeit in this case, VERY small, speed gain). DNS prefetching Google fonts and S.W.org which pulls files from the WP repository.
add_action( 'init', 'remove_dns_prefetch' );
function remove_dns_prefetch () {
remove_action( 'wp_head', 'wp_resource_hints', 2, 99 );
}
Top comments (2)
As a one-off solution — yes, this will help. But for multiple cases, it might not cover everything. In my case, I use a ready-made tool, Clearfy Pro, set it up once and don’t have to worry about it anymore. Thanks to the author — this can definitely be useful for beginners.
Amazing! Thank you for the easy tutorial 🙌