Jetpack for WordPress Speed Guide

If you are running a WordPress self hosted site, you’ll have probably come across Jetpack. Whilst it has some great features such as lazy loading and a free CDN, it can be slow. I eventually moved off of it onto Cloudflare as a CDN of sorts, as the plugin, is to put it bluntly, quite bloated. However, it’s pretty easy to trim Jetpack down to just the parts you want.

  1. Open Jetpack, scroll to the bottom, and click debug.
  2. Click the option at the bottom of the page that says ‘Access the full list of Jetpack modules available on your site‘.
  3. Click the checkbox to enable or disable various modules. You can view their descriptions to see what they did.

When I had Jetpack installed, these are the modules I had enabled. Everything else was disabled:

  1. Asset CDN – Allows assets to be served quicker – served off the i0.wp.com, i1.wp.com and other various subdomains.
  2. Image CDN – This is a stellar feature of Jetpack, that lets you serve images from a free CDN, saving bandwidth and dramatically improving speed.
  3. Lazy Images – Load images as the user scrolls down the page, which has a huge impact on site speed. I use Autoptimize for this now instead.
  4. Monitor – Get notified when your site is down. I also use StatusCake and UptimeRobot for this.
  5. Protect – The more protection the better. I also use Wordfence now to protect my site, as well as server site protections.
  6. Publicize – I used this to automatically tweet new posts.

Of course, you can enable more options you want to. This is just what I ran on this site to keep Jetpack from clogging up my site. This will also make your backend editing experience better.

I don’t have stats enabled as I have added Google Analytics – there’s also a nice trick you can do with GA which I’ll say later in the post. In addition to this, Jetpack stats slows sites down as it adds a tracking pixel.

You may also notice Jetpack loading in a script called devicepx, which is used for Gravatar image resizing. We want to remove this – put the following code snippet into your functions.php to remove unwanted Jetpack CSS.

// remove jetpack css
add_filter( 'jetpack_implode_frontend_css', '__return_false' );

// remove jetpack scripts
function dequeue_devicepx() {
    wp_dequeue_script( 'devicepx' );
}
add_action( 'wp_enqueue_scripts', 'dequeue_devicepx' );

Performance settings

If you are only concerned about performance, disable all the modules apart from Asset CDN and Image CDN. If you use Autoptimize, enable lazy loading in there. If you don’t, also enable the lazy loading module.

  1. Enable the site accelerator. This will let you serve your files quicker. This will also serve your CSS and images quicker. Select both options below.
  2. Enable lazy loading. This will load your images in as the user scrolls. I now use Autoptimize for this – the animation looks better in my opinion.

This will improve your site speed. I moved away as the Photon CDN (the one used in Jetpack) had variable response times, and Cloudflare is a lot quicker as an image cache, what I use now. I also serve my images and site files off a CDN on this site.

Security settings

I have replaced this with Wordfence, which is a great security plugin. If you have Jetpack, you can enable the following two options:

  1. Monitor your site’s downtime, as this will tell you when your site is down so you can fix it. I would also advice using StatusCake and UptimeRobot, as I’ve found they alert you much quicker.
  2. Enable brute force protection. I would also recommend setting up Wordfence, but won’t cover that in this post.

Why there are better options out there

Jetpacks image CDN is great to start off with, but it’s slow and calls different subdomains, impacting site speed. As it uses various subdomains – i0.wp.com, i1.wp.com, etc, it makes multiple DNS calls, slowing down your overall site speed. If you use a dedicated CDN, such as BunnyCDN (what I use on this site), it only makes one DNS call. In addition to this, Photon had very variable image loading times. Since I changed to a premium CDN, images load consistently fast, and I have more power over my CDN (on Photon you cannot delete or purge your images or cache).

For lazy loading, Autoptimize is a great choice. Chances are you already have it installed, and the lazy loading is fast, and works well.

Finally, Google Analytics is a much better choice for site tracking. You can track multiple variables, such as site speed, and view better details about users and what pages are popular.


Hopefully, this post will help you cut out the junk and bloat that Jetpack comes with. Jetpack can be a great plugin once optimized.