The Jetpack WordPress plugin is an amazing plugin that is jam packed with features. Even the free version of the plugin! But If you are like me, you might find that you use lots of the features of core JetPack plugin but none of the MASSIVE amount of CSS that the plugin loads. So why not remove the JetPack CSS file from loading?
With JetPack, you can select the specific features that you want to use on your website. Use the analytics to show your site’s stats. Get free downtime monitoring or quick and easy email subscribers on your site. But, the JetPack plugin will load all the CSS each features and toss it onto your site. Even if you are not using those features.
So I like to remove the Jetpack CSS from my to speed it up to get a better user experience. That JetPack CSS file can get pretty large, and lower your website’s loading time.
How to remove Jetpack CSS from loading
You can remove the Jetpack CSS from loading on your WordPress website by adding some very simple lines of code to your theme.
Either open the built-in theme editor in the WordPress admin panel or open your favorite code editor. Navigate the the WordPress themes directory (/wp-content/themes) and open the directory for your active theme.
Locate your theme’s functions.php file and load that sucker into your editor. At the top of the php file (below the opening php tags of course), simply add these simple lines of code:
add_filter( 'jetpack_sharing_counts', '__return_false', 99 ); add_filter( 'jetpack_implode_frontend_css', '__return_false', 99 );
Save your functions.php file and test your website again on PageSpeed Insights.