The Ideal SiteGround Optimizer Settings 2022: Poor Job Addressing Core Web Vitals

Siteground optimizer settings

Ugh, SiteGround Optimizer.

I’ll show you how to set up SiteGround Optimizer’s settings, just know it does a poor job with web vitals like LCP + CLS. You can use it for caching (with Cloudflare’s full page caching), but I would disable everything else and use a different cache plugin, or use Perfmatters on top of it.

4 reasons you shouldn’t use this plugin:

It does a poor job addressing core web vitals. For images, you can’t preload your LCP image (or any image), lazy load background images, serve smaller images to mobile, or add missing image dimensions to prevent layout shifts. For CSS, it doesn’t support critical CSS or removing unused CSS. For JavaScript, you can’t delay it which can lead to third-party code errors in PSI. For fonts, you can’t host them locally or use font-display: swap to fix the “ensure text remains visible during webfont load” PSI recommendation. This is why I recommend using Perfmatters on top of SiteGround Optimizer (which does almost all of these). Or disable everything in SG Optimizer (except for the caching options) and use a different cache plugin for core web vitals.

2nd reason: it’s not stable. There are ongoing compatibility issues with Elementor, Divi, WooCommerce, and other themes/plugins. For example, search their forums for “Elementor.”

Which leads to reason 3: lack of accountability. SiteGround has a history of blaming other companies like when their DNS was blocked by Google, as well as denying issues like when Backlinko said their TTFB was slow. This plugin is no different if you check the support forums.

Finally, a lot of documentation reads like sales copy and doesn’t actually explain how the feature works. No helper plugins and their “speed tests” are often flawed or not documented.

Below are my recommended settings for SiteGround Optimizer, just don’t say I didn’t warn you.

 

1. Dashboard

Siteground optimizer dashboard

The dashboard shows an overview of your SiteGround Optimizer settings and notifies you of WordPress updates.

You don’t need to achieve perfect scores (3/3, 6/6, 3/3) mainly because you usually shouldn’t combine CSS/JS and may not end up using SiteGround Optimizer for image optimization (since it does a poor job compared to dedicated image optimization plugins and image CDNs). It would probably look more like (3/3, 5/6, 1/3) with that setup, or even (3/3, 0/6, 0/3) if you decide to use SiteGround Optimizer strictly for caching and a different cache plugin for everything else.

Decide On A Setup

The first option is to use SiteGround Optimizer only for caching (so you still get dynamic + memcached), then use FlyingPress or WP Rocket for everything else. This is what I would do.

The second option is using SiteGround Optimizer with Perfmatters which takes care of most lacking features in SiteGround Optimizer. You can look at the Perfmatters settings and compare.

The last (cheapest but worst) option is to use SiteGround Optimizer with a bunch of free plugins to compensate for lacking features: Gijo’s plugins, Optimole, WP YouTube Lyte, Pre* Party Resource Hints, DeBloat for removing unused CSS, likely others. It can get messy though.

You’ll also want to decide on a CDN and image optimization service. Use SiteGround’s CDN if you want, but it only has 14 PoPs with lacking features and you have to use SiteGround’s DNS. I would lean towards FlyingProxy (integrates several Cloudflare Enterprise features including full page caching) or FlyingCDN (uses BunnyCDN with Bunny Optimizer and geo-replication). Both optimize images, or you can always use a dedicated image optimization plugin like ShortPIxel, but you’ll also need an adaptive images plugin to resize images on mobile to reduce mobile LCP.

 

2. Caching Settings

Siteground optimizer caching settings

Caching is the biggest benefit of using SiteGround Optimizer.

If you’re using another cache plugin with SiteGround Optimizer, only use 1 plugin for file-based caching. You can leave filed-based caching off in SiteGround Optimizer and use the other cache plugin. Or turn it on in SiteGround Optimizer, then disable it in your other cache plugin. In WP Rocket, you’ll use the Disable Page Caching helper plugin. In FlyingPress, go to FlyingPress → Cache → Cache Pages → Off. Dynamic caching and memcached should be left on in SiteGround Optimizer since these are different layers. There will be other overlapping features too, so only use 1 plugin for each optimization.

  • Dynamic Caching: On – enables dynamic cache (full-page caching from NGINX).
  • File-based Caching: On –  creates a static HTML version of your website and stores it in the browser memory according to SiteGround. This is also the only caching layer that can be used with non-SiteGround hosted websites. The “configure” button has more settings.
    • Cleanup Interval: 1 week – expiration for file-based caching until it’s purged.
    • Preheat CacheOn – artificially fills the cache so visitors get a better cache hit ratio (similar to preloading in WP Rocket). Once the cache is purged, it’s preloaded using your sitemap and is executed with cron. This can increase CPU usage if you’re not careful and leaves little customization to change sitemap URLs + preload intervals.
    • Logged-in Users Cache: Off – only enable if you have user-specific content where visitors need their own cached version (mainly used on membership sites). There’s no customization settings / helper plugins and it also increases size the stored cache size.
Siteground optimizer preheat cache
File-based caching Settings
  • Memcached: On – enables memcached object cache which speeds up database queries. You will first need to activate this in Site Tools under Speed →  Caching → Memcached.
Siteground memcached site tools
You need to activate memcached in Site Tools before activating it in SiteGround Optimizer
  • Automatic Purge: purges the cache when specific changes are made to your website according to SiteGround’s rules. There’s been several reports of this not working, so make sure it is. A full purge is done during larger changes (updating WordPress plugins/core or deleting a category) while a smart purge is done for smaller updates (modifying a post or adding a comment). Dynamic and file-based caching must both be enabled for it to work.
    • Purge WordPress API Cache: On – also purges the Rest API which is used on many websites including the block editor. If you don’t use Rest API, you can leave this off.
  • Manual Cache Purge: usually only needed when automatic purge isn’t working for you.
  • Exclude URLs From Caching: excludes URLs from dynamic + file-based caching. I assume eCommerce pages are auto excluded, but there’s no documentation beyond using wildcards * to exclude specific sections of your website, like this: abc.com/category/seo*
  • Browser-Specific Caching: Off – SiteGround recommends only enabling this if you’re having issues with plugins or things like generating the mobile version of your website.
  • Cloudflare Full Page Caching: READ – when you set up Cloudflare in Site Tools, you’re forced to use WWW in your domain (which you’ll see a warning for). If you already use WWW, you can go ahead and do this, enable full page caching in SiteGround Optimizer, then enter your Cloudflare email + Global API key. But if you’re not using WWW, this can lead to problems (redirecting your site to WWW, a possible loss in rankings, etc). In this case, you have 3 options, but they all require you to sign up for Cloudflare directly through their website, change nameservers, then change your website to the orange cloud in your DNS settings so your traffic is proxied. Once that’s done, you can pick from your 3 options: enable full page caching in SiteGround Optimizer, use Super Page Cache for Cloudflare, or use Cloudflare’s APO for $5/mo. Either way, you definitely want to use full page caching somewhere. This will cache HTML on Cloudflare’s network and can significantly improve TTFB which you can measure in 10 global locations using KeyCDN.
Siteground cloudflare warning
Read SiteGround’s WWW warning before setting up Cloudflare through them
Siteground optimizer authenticate with cloudflare 1
Add your Cloudflare email + Global API key in SiteGround Optimizer

 

3. Environment Settings

Siteground optimizer environment settings

Environment settings are where you can force SSL, fix mixed content errors, control WordPress Heartbeat, and schedule database cleanups.

  • HTTPS Enforce: On – automatically force visitors to use a secure HTTPS connection. I assume most of you will be using the free Let’s Encrypt SSL you get through Site Tools.
  • Fix Insecure Content: Off – if you see mixed content warnings in your browser when using SSL, it means you’re loading both HTTPS + HTTP. This can fix it, leave off otherwise.
  • GZIP Compression: On – compress pages (Brotli is only available on SiteGround’s CDN).
  • Browser Caching: On – stores static files in the browser so they can be accessed quicker.
  • WordPress Heartbeat Optimization: Disabled, 120s, Disabled – the only place you usually want Heartbeat is the post editor (posts and pages) since it handles things like autosaves to prevent you from losing work. Then disable it in the admin and frontend. Otherwise, the WordPress Heartbeat API will run every 15-60s and increases CPU usage.
  • Scheduled Database OptimizationOffWP-Optimize does a better job of database cleanups. It lets you choose which items are deleted and can keep a few post revisions instead of deleting them all. Most importantly, it lets you go through your actual database tables and remove junk left behind by old plugins you’ve deleted. You can also see which plugins/modules add the most database overhead (you should consider disabling them).
Wp optimize unused database tables
Use WP-Optimize to remove database tables left behind by old plugins marked as “not installed”
Wp optimize schedule database cleanups
WP-Optimize lets you keep a certain amount of post revisions (unlike SG Optimizer which deletes them all)

 

4. Frontend Settings

Siteground optimizer css settings

Siteground optimizer javascript settings

Siteground optimizer frontend general settings

  • Minify CSS/JavaScript/HTML: On – even when using Cloudflare’s APO, you should use your cache plugin to minify files which removes whitespaces and makes the files smaller.
  • Exclude From Minification: if certain minify settings break your website, you’ll need to view your source code, find the problematic files, then exclude them from minification.
  • Combine CSS/JavaScript: Off – most websites shouldn’t combine files for several reasons. It can often result in slower load times and have issues with HTTP/2 + HTTP/3.
  • Exclude From Combination: no need to do anything here unless the combine setting is turned on and you need to exclude specific CSS, JavaScript, or HTML files from combining.
  • Preload Combined CSS: Off – if you combined CSS, this preloads the file to load faster. But again, since most websites shouldn’t combine, this setting should also be disabled.
  • Defer Render-Blocking JavaScript: On – fixes render-blocking resources but can also break your website, in which you’ll exclude files. This is not the same thing as delaying JS.
  • Exclude From Deferral Of Render-Blocking JS: instead of disabling the previous setting if your site breaks, you’ll want to learn what’s breaking, find problematic files, and exclude them. Check these support threads to see previous issues with Woo, Elementor, Divi, etc.

Siteground optimizer exclude from deferral of render blocking js

  • Web Fonts Optimization: On – SiteGround’s blog post explains how it ‘catches’ loaded fonts, parses them, and loads them inline asynchronously. Since then, they’ve also added preconnect to fonts.gstatic.com if you’re using third-party Google Fonts. However, a better method is to host fonts locally which you can do in Elementor, many plugins, or manually.
  • Fonts Preloading: only self-hosted fonts can be preloaded. PageSpeed Insights used to tell you which fonts to preload under preload key requests but I don’t believe they do anymore. So you’ll need to look at your font files in the GTmetrix Waterfall chart, copy the URLs of all fonts loading above the fold (or mentioned in CSS files), then preload them in SG Optimizer. Test your results since preloading too many fonts can have a negative effect. When you’re done, retest your site and your font’s ‘blocking time’ should have gone down.

Siteground optimizer fonts to preload

  • Remove Query Strings From Static Resources: On – this is a deprecated GTmetrix item.
  • Disable Emojis: On – emojis aren’t good for load times. If you need them, use Unicode.
  • DNS Pre-fetch For External Domains: Usually Empty – normally, you’d want to prefetch third-party domains, but delaying JavaScript is more effective. And since fonts.gstatic.com + CDN URLs should use preconnect instead, there’s little reason to use prefetch. The only third-party domains you should prefetch are those not being delayed/preconnected.
Third party code
Most third-party code should be hosted locally, preconnected, or delayed (these are faster than prefetch)
Siteground optimizer manage external domains
Only prefetch third-party domains if they’re not being delayed or preconnected

### Popular JavaScript Files You Can Delay Using Flying Scripts Or Perfmatters ###
https://platform.twitter.com/widgets.js
https://connect.facebook.net/en_US/fbevents.js
https://www.google-analytics.com/analytics.js
https://www.googletagmanager.com/gtm.js
https://www.googletagmanager.com/gtag/js
https://www.googletagservices.com/tag/js/gpt.js
https://www.googleoptimize.com/optimize.js
https://www.google.com/recaptcha/api.js
https://maps.google.com/maps/api/js
https://maps.googleapis.com/maps/api/js
https://pagead2.googlesyndication.com/pagead/js
https://platform.twitter.com/widgets.js
https://ajax.googleapis.com/ajax/
https://code.jquery.com/

Lacking Features

  • Delay JavaScript: Flying Scripts, Perfmatters, FlyingPress and WP Rocket do this. WP Rocket is automatic while the Flying plugins require you to add files manually. I listed common JS files below but you want to read your plugin’s documentation. Delaying JavaScript is often used for third-party code in PSI and plugins loading below the fold (social sharing + third-party comment plugins are both common).
  • Remove unused CSS: you’ll ideally use Perfmatters or FlyingPress since they load used CSS in a separate file (as opposed to WP Rocket’s inline method which is slower for real-world visitors, since it can’t be cached and increases HTML size).
  • Critical CSS: this has been a feature request for years and SiteGround said they were working on it, but it’s still not here. You could try Autoptimize with Critical CSS power up, but I haven’t tried it on SiteGround Optimizer. Use at your own risk.
  • Host fonts locally: Elementor, Perfmatters, FlyingPress, OMGF, or do it manually. As previously mentioned, fonts must be hosted locally to preload them which is much faster than pulling them from third-party domains like fonts.gstatic.com.

 

5. Media Settings

Siteground optimizer media settings

I don’t recommend SiteGround Optimizer for optimizing images, but if you do, here are the settings.

It doesn’t optimize above the fold content, background images, several mobile optimizations, etc (see list below). You’re better off using Cloudflare MiragePolish, Bunny Optimizer, or a plugin dedicated to image optimization like ShortPixel/Smush. Even Perfmatters excludes leading images, adds missing dimensions, and replaces YouTube iframes with a preview image.

  • Image Compression: Disable –  only enable when using SiteGround Optimizer for image optimization. PSI tests images at an 85% compression level – so that’s what I recommend.
Siteground optimizer image compression settings 1
Image compression settings
  • Use WebP Images: Off –  ideally use your CDN (Cloudflare Polish or Bunny Optimizer) for WebP. Then I would recommend ShortPixel, and lastly SiteGround Optimizer. The default WebP quality is 80% which can be changed by adding the code to your functions.php file.
add_filter( 'sgo_webp_quality', 'webp_quality' );
function webp_quality( $quality ) {
    // Add the value you want to adjust as Webp image quality.
    $quality = 100;

    return $quality;
}
  • Lazy Load Media: Off – no support for lazy loading background images or replacing YouTube iframes with a preview image. There’s also been ongoing compatibility issues.
  • Exclude CSS Classes From Lazy Load – above the fold images should be excluded from lazy load or it will increase LCP. Excluding images based on CSS classes + media types is a pain… you would have to use Chrome Dev Tools to inspect images, copy their CSS class, and add them here. The better method is to exclude leading images based on the number of images usually shown above the fold. Most websites can set this to 2-3 and you’re done. SiteGround does have a skip-lazy helper class you can also use (see screenshot below).

Siteground optimizer skip lazy class

  • Exclude Media Types From Lazy Load – I’m not sure why things like iframes, videos, and mobile are excluded from lazy load by default. These should be lazy loaded, so
Siteground optimizer exclude media types from lazy load 1
Media types for lazy load settings
  • Maximum Image Width: Off – uploaded images over 2560px will be resized for smaller dimensions. Useful if you have clients who upload huge images and don’t know better. You would likely turn this on if you’re using SiteGround Optimizer for image optimization. To specify a custom maximum image width, add the code below to your functions.php file.
add_filter( 'sgo_set_max_image_width', 'max_image_width' );
function max_image_width( $max_allowed_width ) {
    // Add the value you want to adjust as max image width.
    $max_allowed_width = 1250;

    return $max_allowed_width;
}

Lacking Features

  • Preload above the fold images: all above the fold images should be excluded from lazy load and preloaded. Perfmatters and FlyingPress make it easy by setting a specific number of images that are typically shown above the fold (usually 2-3).
  • Serve smaller images to mobile: Cloudflare, BunnyCDN, and ShortPixel Adaptive Images all do this. This is different than SiteGround Optimizer’s max. image width.
  • Add missing image dimensions: most speed plugins let you specify image dimensions which can improve your CLS score, but SiteGround Optimizer doesn’t.
  • Replace YouTube iframe w/ preview images: most speed plugins do this too, or use WP YouTube Lyte. FlyingPress is the only plugin I know that can self-host YouTube placeholders which will prevent third-party requests from ytimg.com.
  • Lazy load background images: since SiteGround Optimizer doesn’t support this, background images can cause errors for defer offscreen images in PSI. Optimole is a good free solution, FlyingPress is easy since they use a lazy-bg helper class, and WP Rocket supports this but makes you move background images to inline HTML.
  • Replace picture tags for WebP: you can read the support thread on it if you want.

 

6. Speed Test

Mobile scores are usually more important since Google uses mobile-first indexing.

You should be able to get better results with my tips. But if your TTFB is slow, it’s probably SiteGround’s fault. I suggest Rocket.net + Cloudflare Enterprise (what I use), Cloudways Vultr HF (what I was previously using), or NameHero (cheap LiteSpeed servers). These are all faster than SiteGround (IMO) who has a history of a slow TTFB which they constantly deny, even though this has been reported over and over in Facebook Groups. But that’s for another post.

Siteground optimizer speed test

 

Using Cloudflare APO With SiteGround Optimizer

This section is only if you plan on using APO (not full page caching in SiteGround Optimizer).

According to SiteGround, their SiteGround Optimizer plugin already does what APO does. It caches dynamic content (HTML) on Cloudflare’s edge network which has 270+ global locations.

Siteground optimizer cloudflare apo

If this is true, you can confirm these claims by verifying APO is working. Simply visit uptrends.com, enter your domain name as https://www. and you should see the following:

  • CF-Cache-Status: HIT
  • cf-apo-via: tcache
  • cf-edge-cache: cache, platform=wordpress.

Test cloudflare apo

You can also run your site through KeyCDN’s performance test which measures TTFB in 10 global locations. Assuming SiteGround’s claims about APO (and their TTFB being fast) is actually true, it should be reflected in KeyCDN and your TTFB should relatively fast worldwide.

Keycdn-performance-test

Setting Up Cloudflare APO On SiteGround

There is very little documentation on whether APO is compatible with SiteGround’s Optimizer plugin, let alone instructions for setting up APO (so follow these instructions at your own risk).

  • Deactivate Cloudflare In Site Tools since there’s no option to use APO.
  • Sign up for Cloudflare through their website.
  • Change nameservers to the ones Cloudflare assigned you.
  • Change your website from DNS only to proxied in Cloudflare’s DNS settings.
  • Enable minification in SiteGround Optimizer, then disable in Cloudflare.
  • Purchase APO in your Cloudflare account.
  • Disable dynamic caching in SiteGround Optimizer.
  • Install the Cloudflare plugin.
  • Create an API token and add it to the plugin.
  • Purge cache in SiteGround Optimizer, then in Cloudflare.
  • Confirm APO is working using uptrends.com and KeyCDN.

 

Consider Using Cloudflare / BunnyCDN

I previously explained how SiteGround’s CDN requires you to also use their DNS which was blocked by Google for 4 days (while SiteGround denied any blocking issues). And this was after they launched their new and improved centralized DNS. Do you want to risk losing your Google rankings and getting deindexed? For that reason alone, SiteGround’s CDN isn’t even an option.

I’m a fan of the Cloudflare + BunnyCDN combination which is also recommended by Gijo from WP Speed Matters. I use Cloudflare Enterprise + BunnyCDN, but we’ll stick with what we have. If you’re using FlyingPress, FlyingCDN uses BunnyCDN and is awesome. If you’re using WP Rocket, RocketCDN uses StackPath and is not awesome. You can read my post on best WordPress CDNs.

Cloudflare with bunnycdn

Cloudflare – see my recommended Cloudflare settings. One thing to consider is Cloudflare Pro since it includes APO, Polish, and Mirage, along with other features like Cloudflare firewall. Or you could just use APO for $5/mo with a freemium image optimization plugin like Optimole.

BunnyCDN – my BunnyCDN tutorial has complete instructions for setting it up and using features like geo-replication and Bunny Optimizer for image optimization. It’s fast, reliable, cheap, and easy using their setup instructions. SiteGround Optimizer doesn’t have a setting for CDN URLs so you’ll just use BunnyCDN’s plugin. My code OMM5 also gives you $5 in free credits.

 

Lacking Features In SiteGround Optimizer

Tell me SiteGround Optimizer is the best cache plugin and I’ll show this table. FlyingPress does more than both of these.

SG Optimizer WP Rocket FlyingPress
Server-side caching x x
Delay JavaScript x
Remove unused CSS x Inline Separate file
Critical CSS x
Host fonts locally x x
Font-display: swap x
Preload links x
Preload critical images x x
Fetchpriority resource hint x x
Lazy render HTML elements x x
Lazy load background images x Inline Helper class
Exclude above the fold images By class By URL By number
Add missing image dimensions x
YouTube iframe preview image x
Self-host YouTube placeholder x x
CDN (beyond Cloudflare) SiteGround CDN StackPath BunnyCDN
CDN PoPs 14 60 93
CDN Tbps N/A 65 80
Dynamic caching Premium x Vary cache
CDN geo-replication x x
CDN image optimization x
CDN image resizing for mobile x x
Documented APO compatibility x x

 

SiteGround Optimizer Isn’t Stable

SiteGround Optimizer constantly runs into compatibility issues with Elementor, Divi, WooCommerce, and other themes/plugins.

Instead of fixing them, they like to push the blame on the themes/plugins. Which also means there’s little to no documentation about known compatibility issues. They also don’t thoroughly test updates before releasing them, making the plugin extremely unstable. There, I warned you.

Siteground optimizer denial of compatibility issue

Siteground optimizer third party compatibility issue

Siteground optimizer envira gallery compatibility issue

Siteground optimizer woocommerce compatibility issue

Best performance plugin on siteground

Siteground optimizer theme plugin compatibility issue

 

Final Thoughts

What’s there left to say? I wouldn’t use this plugin on any serious website. And I wouldn’t use SiteGround either, but that’s a whole different list of reasons. I’m sure some people like them and we can agree to disagree, but I think we can both agree SiteGround Optimizer needs work.

Cheers,
Tom

You Might Also Like:

47 thoughts on “The Ideal SiteGround Optimizer Settings 2022: Poor Job Addressing Core Web Vitals”

  1. I found this really helpful. I’m in the process of setting up my SiteGround site. I still have to set up the Cloudflare component and will return to this page when I do. I noticed that my page gets an A on GTmetrix but that Google PageSpeed gives me very different results. Do you know why that is? Thank you.

    Reply
    • Hi Cathy,

      That’s common with GTmetrix and PageSpeed Insights (you should use PSI or the Lighthouse report in Chrome Dev Tools). Read here.

      I completely rewrote this tutorial and it will be updated in a month or so when I relaunch my new blog. Basically pointing out the (many) lacking features in SiteGround Optimizer along with workarounds. Many people use SG Optimizer strictly for caching then use another cache plugin like FlyingPress or WP Rocket to address core web vitals… which is what I also recommend. See this table.

      Reply
  2. Hi,
    I love your work and appreciate you writing all of this, it is a massive help to me.

    I have SG Optimiser and WP Rocket. I have tested both just now after following your instructions on this page and I get pretty different results. WPR is giving me 98 on desktop and 85 on mobile and SGO is giving me 92 on desktop and 62 on mobile. So I wonder if I am missing something as you are saying I should be getting similar results. I’d love to get rid of WPR if they were similar! Does this sound like user error or has WPR improved something recently?

    Reply
    • They constantly update both plugins and it’s hard to keep track of how each update impacts speed/scores. Could be how they’re setup, for example, WP Rocket adds browser resources hints and delays JavaScript automatically. I believe in SiteGround Optimizer, you would have to do most of these manually.

      Did you setup Nginx direct delivery, dynamic cache, and memcached in SiteGround? Because right now it looks like server response time is the biggest issue.

      Reply
    • Unfortunately no. SiteGround Optimizer is only for websites on SiteGround. LiteSpeed Cache is only for websites on a LiteSpeed server (NameHero, A2 Hosting, etc).

      Reply

Leave a Comment