The Ideal SiteGround Optimizer Settings (A Comprehensive Guide To Configuring The Plugin With Caching, Cloudflare, And Core Web Vitals)

Siteground optimizer settings

Want to configure the newest settings for SiteGround Optimizer?

Even though I don’t recommend SiteGround, their SiteGround Optimizer plugin has gotten better over the years. But I hope you’ll reconsider using them. Their TTFB is slow, support declined, CPU limits make you upgrade, and they’re admins of several Facebook Groups and removed hundreds (or even thousands) of negative posts about their brand. Super unethical company which is why I left them for Cloudways Vultr HF and you can see my migration results.

Siteground no value (bad review)

Siteground free (bad review)

I rewrote this tutorial to be updated for the latest version which includes a completely new design, Cloudflare’s full page caching, among other features. And since the older updates in 5.0 and 5.6, SiteGround Optimizer officially makes WP Rocket obsolete if you’re using SiteGround.

They added lots of features (heartbeat control, database cleanup, prefetch, preload, image optimization, etc). SiteGround Optimizer also uses server level caching which is faster than WP Rocket’s file-based caching. So yes, you can delete your old cache plugin and use SG Optimizer.

The only other plugin I recommend on top of SiteGround Optimizer is Kinsta’s Perfmatters plugin which takes care of a few things SG Optimizer lacks: removing unused CSS + JavaScript by unloading assets on specific content, bloat removal, hosting Google Analytics locally, etc).


1. Dashboard

The SiteGround Optimizer dashboard is an overview of your settings and notifies you of WordPress updates. You don’t need to achieve a perfect score (3/3, 6/6, 3/3) for everything. Mainly because combining CSS/JS files is not always recommended especially for larger sites. And minification should usually be done by your CDN (Cloudflare) instead of your cache plugin.

Siteground optimizer dashboard


2. Caching Settings

Before configuring SiteGround Optimizer’s caching settings, login to your Site Tools account and go to Speed →  Caching (enable NGINX direct delivery, dynamic cache, and memcached).

Siteground memcached

Siteground optimizer caching settings

  • Dynamic Cache – On – enables dynamic cache which uses full-page caching by NGINX.
  • Memcached – On – enables memcached which speeds up database queries. Once it’s activated in Site Tools, this can be also activated in the SiteGround Optimizer settings.
  • Automatic Purge – purges cache when SiteGround Optimizer detects changes on your site. A full purge is done when you update WordPress plugins/core or delete a category, while a smart purge is done when a post is modified or after a comment is left. SiteGround recommends that you leave the “purge WordPress API cache too” setting Off  “unless you are actively using the REST API at the moment and you’re experiencing problems with it.”
  • Manual Dynamic Cache Purge – no need to do this since automatic purge should be on.
  • Exclude URLs From Caching – if you need to exclude certain URLs from cache, add them.
  • Exclude Post Types From Caching – same thing as the previous setting but for post types.
  • Browser-Specific CachingOff – SiteGround recommends only enabling this if you are having issues with plugins or things like generating the mobile version of your website.
  • Cloudflare Full Page Caching – On – enable for most websites, but usually not for WooCommerce or sites with lots of dynamic content. This caches everything instead of only static assets like CSS, JS, and images (can make a big difference). You need to activate Cloudflare in Site Tools, then add your Cloudflare email + Global API key to SG Optimizer. I also suggest using Cloudflare to minify CSS/JS/HTML and disabling this in SG Optimizer.
Siteground cloudflare settings
Activate Cloudflare in Site Tools and use Cloudflare for minification (turn off in SiteGround Optimizer)
Siteground optimizer authenticate with cloudflare
Authenticate Cloudflare in SiteGround Optimizer and enable full page caching


3. Environment Settings

Environment settings are where you can force SSL, fix mixed content errors, control the WordPress Heartbeat API, prefetch third-party domains, and schedule database cleanups.

Siteground optimizer environment settings

  • HTTPS EnforceOn – to add SSL, activate a free Let’s Encrypt SSL in your SiteGround account, then turn on HTTPS Enforce in SiteGround Optimizer. Your website will automatically be configured for HTTPS, then your site will have the lock icon in browsers.
  • Fix Insecure ContentOff – if you see mixed content warnings in your browser when using SSL, it means you’re loading both HTTPS + HTTP. This can fix it, otherwise leave off.
  • WordPress Heartbeat Optimization – the WordPress Heartbeat API consumes CPU by showing you real-time plugin notifications, when other users are editing a post, etc. It’s not always a good idea to disable Heartbeat completely, but you can at least increase the interval to save resources and reduce CPU usage. I suggest 60s, 120s, 120s respectively.
  • DNS Pre-fetch For External Domains – open Chrome Dev Tools and use the sources tab to see third-party domains loading on your site. Prefetch establishes earlier connections to make them load slightly faster. Perfmatters and Flying Scripts can improve their load times more by delaying third-party JavaScript. Fonts + analytics should be hosted locally.
Find third-party domains in Chrome Dev Tools → Sources → Page
Siteground optimizer prefetch external domains
Prefetch those external domains in SiteGround Optimizer


4. Frontend Settings

Minification should ideally be done with Cloudflare, then should be turned off in SiteGround Optimizer. Combining files is only recommended for small websites with <10KB CSS/JS sizes.

Siteground optimizer frontend css general optimization settings

Siteground optimizer frontend javascript optimization settings

Siteground optimizer frontend general optimization settings

  • Minify – Off – use Cloudflare to minify CSS/JavaScript/HTML which is faster than SG Optimizer. If you’re not using Cloudflare to minify files, these options should be enabled.
  • Exclude From Minification – if enabling minify in SiteGround Optimizer causes errors on your site, find problematic files in your source code, then exclude them from minification.
  • Combine FilesOff – only combine CSS on very small websites (and always test it). Otherwise, it can result in slower load times. WP Johnny recommends only combing if your total CSS/JS is 10kb or less which you can check in your GTmetrix Waterfall chart.
  • 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 CSSOff – if you combined CSS, this preloads the file to load faster.
  • Defer Render-Blocking JavaScriptOn – defers JavaScript which can fix render-blocking resources in Lighthouse by delaying JS loading. Check your site for errors.
  • Exclude From Deferral Of Render-Blocking JS – the previous setting can sometimes break your website. If it does, find the problematic JavaScript files and add them here.
  • Web Fonts OptimizationOn – optimizes Google Fonts by adding preconnect to Also optimizes self-hosted fonts by preloading them. You should try to host fonts locally to avoid requests from (you can try the OMGF plugin).
  • Fonts Preloading – run your site through PageSpeed Insights and if Google recommends preloading key requests, they may suggest preloading certain fonts which you’ll add here.
  • Remove Query Strings From Static ResourcesOn – this is an old item in GTmetrix.
  • Disable EmojisOn – emojis aren’t good for your load times, so this will disable them.

Css size


5. Media Settings

SiteGround Optimizer’s media settings optimizes images through compression, WebP, lazy loading, and setting a maximum width which prevents users from uploading enormous images.

Siteground optimizer media settings

  • Image Compression – compression level should ideally be 85% since that’s what Lighthouse tests your website at and will result in the maximum savings. But, it will also result in the highest quality loss, so it really depends on your preference. Before saving, always backup the original images in case you’re not happy with the new image quality.
  • Use WebP Images – serve WebP images which fixes the next-gen formats item in PSI.
  • Lazy Load Media – lazy loads responsive images, thumbnails, widgets, and Gravatars.
  • Exclude CSS Classes From Lazy Load – you shouldn’t have to do anything here.
  • Exclude Media Types From Lazy Load – you shouldn’t have to do anything here.
  • Maximum Image Width – resizes images over 2560px if you’re uploading huge images.
Siteground image compression settings
85% compression level is what’s used in Lighthouse


6. Speed Test

The speed test runs your website through PageSpeed Insights.

If your Google Score is bad, check my guide on core web vitals. If your page load time sucks, check my WordPress speed guide. And if your TTFB is slow, that’s SiteGround for you. Give Cloudways Vultr High Frequency (who I use), Kinsta, or LiteSpeed servers on NameHero a try.

Backlinko ttfb test
SiteGround has a slow TTFB reported by Backlinko


Functionality SG Optimizer Still Lacks

There are still some things SG Optimizer lacks.

Asset Unloading – SiteGround Optimizer doesn’t have any settings to remove unused CSS/Javascript. Most times, this is done using asset unloading plugins like Perfmatters or Asset CleanUp. Both plugins let you disable unused assets (plugins, scripts, styles) on content where it doesn’t need to load. This reduces the overall size of your pages and results in better PSI scores.

Remove unused elementor css javascript

Bloat Removal – other than database cleanup, SiteGround Optimizer doesn’t do much bloat removal (limiting post revisions, increasing the autosave interval, disabling WooCommerce admin bloat), and other things can reduce bloat and CPU usage. I also use Perfmatters for this but you can try Widget Disable, Disable WooCommerce Bloat, or doing things manually like increasing your autosave interval. There’s usually lots of junk you should consider removing.


Hosting Google Analytics Locally – fixes the “leverage browser caching” error in GTmetrix PageSpeed for Google Analytics using either Perfmatters, Flying Analytics, or CAOS Analytics.

Delay JavaScript – there’s no option to delay JavaScript, so try using the Flying Scripts plugin.


Can I Delete My Old Cache Plugin?

Yes, you can.

There’s absolutely no reason to use WP Rocket anymore on SiteGround since SiteGround Optimizer has nearly every feature of WP Rocket, plus it uses faster server level caching.




Avoid Duplicate Functionality

If you keep WP Rocket or another cache plugin, disable page caching using the helper plugin since you only want to use 1 plugin for caching (and avoid duplicate functionality in general). If you activated Cloudflare in SiteGround, the default settings should work perfectly, but I would still configure page rules, enable hotlink protection, and test Brotli, Railgun, and Rocket Loader.

SG Optimizer should automatically disable duplicate functionality:



Did I Miss Anything?

I hope this was helpful, but I also hope you consider moving away from SiteGround. If not because their TTFB is slow, then because they’ve become a very unethical hosting company.

See Also: My Full WordPress Speed Optimization Guide


About Tom Dupuis

Tom Dupuis writes WordPress speed and SEO tutorials out of his apartment in Denver, Colorado. In his spare time, he plays Rocket League and watches murder documentaries. Read his bio to learn 50 random and disturbing things about him.

45 thoughts on “The Ideal SiteGround Optimizer Settings (A Comprehensive Guide To Configuring The Plugin With Caching, Cloudflare, And 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.

    1. 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.

  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?

    1. 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.

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

Leave a Reply

Your email address will not be published.