How To Configure SiteGround’s SG Optimizer Settings — Latest Version 5.7.20, Including Plugins To Compensate For Lacking Features

SG Optimizer Settings

Want to configure the ideal settings for SG Optimizer?

SG Optimizer’s settings now have nearly every feature as WP Rocket. Since SG Optimizer 5.6, they added heartbeat control, database cleanup, and prefetching external domains. Combined with the 5.0 update, SG Optimizer officially makes WP Rocket obsolete when using SiteGround.

A main benefit of SG Optimizer is that it uses server-side caching and binaries instead of the file-based caching done by WP Rocket and other cache plugins, which is significantly faster.

The only other plugin I recommend on top of SG Optimizer is Kinsta’s Perfmatters plugin which takes care of features SG Optimizer lacks: selectively disabling plugins from content, removing  bloat + jQuery, and hosting Google Analytics locally. Otherwise, SG Optimizer does everything.


 
*Backlinko reported SiteGround had some of the slowest TTFBs and they were also one of the slowest hosts in my speed test. I don’t recommend them since their slower TTFBs, price increases, CPU limits, and overall business decisions (see my full review).

 

1. SuperCacher Settings

SiteGround’s SuperCacher has 3 layers of cache – static, dynamic, and memcached. StartUp only includes only one layer (static cache) while GrowBig and GoGeek come with all 3 layers – this is shown on their features page. Ideally, you want to enable all 3 layers of SuperCacher. By default, memcached is disabled and you will need to activate this using the instructions below.

SG Optimizer - SuperCacher Settings

Activating 3 Caching Levels – login to your Site Tools account and go to Speed → Caching. You’ll want to enable all 3 caching levels: NGINX Direct Delivery, dynamic cache, memcached.

SiteGround NGINX Delivery

NGINX Direct Delivery – serves static resources (images, JS, CSS, etc) through NGINX.

Dynamic Cache – enable dynamic cache which caches dynamic (changing) content.

Memcached – enable memcached which primarily speeds up database queries. Once memcached is activated in your SiteGround account, it can also be activated in SG Optimizer.

SiteGround Memcached

 

2. Environment Optimization

Activate everything except “fix insecure content” and add third-party domains to prefetch.

SG-Optimizer-Environment-Settings

Enable HTTPS – to add SSL, simply activate the free Let’s Encrypt SSL in your SiteGround account, then click “enable HTTPS” in SG Optimizer. SiteGround will automatically configure your site for HTTPS, and when you’re done, your website should have the lock icon in browsers.

Fix Insecure Content – if you see mixed content warnings in your browser when using SSL, it means you’re loading both HTTPS + HTTP. Enabling this can fix it, otherwise leave it disabled.

WordPress Heartbeat Optimization – the WordPress Heartbeat API consumes CPU and should ideally be disabled, or at least increase the interval. This makes a check every 15-60 seconds and shows you when other users are editing a post, real-time plugin notifications, etc.

DNS Pre-fetch For External Domains – establishes an early connection to third-party domains. See your “reduce impact of third-party code” report in Lighthouse, copy the URLs of your third-party domains, then paste them into SG Optimizer. This post has a list of common domains to prefetch. Flying Scripts can also help optimize third-party code by delaying JavaScript. I delayed my comments (wpDiscuz and Gravatars) which significantly reduced my post’s initial load times.

Third Party Usage

Scheduled Database Maintenance – cleans database by optimizing tables and removing junk.

GZIP Compression – enables gzip (if enabled here, disable it in Cloudflare + CDNs).

Browser Caching – enables browser caching.

 

3. Frontend Optimization

Typically, you would enable everything but test each setting to see it’s impact on your load time. Sometimes, combining CSS and JavaScript files isn’t good. If minify options break your site, you’ll want to find the problematic files in your source code and exclude them from minification.

SG Optimizer Frontend Optimization

Minify the HTML Output – fixes minify HTML in GTmetrix + PageSpeed Insights.

Minify JavaScript Files – fixes minify JavaScript in GTmetrix + PageSpeed Insights.

Combine JavaScript Files – combines JavaScript files into 1 single file to load faster.

Defer Render-Blocking JS – fixes remove render-blocking JS in PageSpeed Insights.

Minify CSS Files – fixes minify CSS items in GTmetrix + PageSpeed Insights.

Combine CSS Files – combines CSS files into 1 single file to load faster.

Optimize Loading Of Google Fonts – combines Google Font files to load faster. If you’re using Google Fonts, you should also try hosting fonts locally and using the OMGF plugin which may improve font load times. GTmetrix has a fonts section in the Waterfall so be sure to check that.

Remove Query Strings From Static Resources – old item in GTmetrix and is usually caused by plugins, so be sure to check your GTmetrix report to see which plugins are causing these errors. Enabling this may help, but using the right (lightweight) plugins is the best way to solve this.

Disable Emojis – emojis hurt load times.

 

4. Media Optimization

The Media Optimization settings help make images, videos, iframes, and Gravatars to load faster. The only thing it doesn’t do is serve scaled images (making sure you’re using the right image dimensions and not uploading huge images) which has to be done by you, not a plugin.

SG Optimizer Media Optimization Settings

New Images Optimization – losslessly compresses images which should fix the optimize images item in GTmetrix. I wish SiteGround had options for compression levels and WebP.

Existing Images Optimization – losslessly compresses existing images, but take a backup of your website first! In the chance you do see a loss in quality, at least you will have a backup.

Lazy Loading – delays loading of iframes, videos, Gravatars, and images until users scroll down the page and see them. This improves initial load times and is recommended in testing tools.

 

5. Performance Test

Tests your website in Google PageSpeed Insights. Here are my results on the demo site.

SG-Optimizer-Performance-Test

 

Functionality SG Optimizer Still Lacks

There are still optimizations SG Optimizer lacks which have to be done by other plugins.

Remove Bloat – remove unnecessary bloat (including Heartbeat) using Perfmatters by Kinsta or Clearfy. I recommend Perfmatters since it’s lightweight and lets you remove tons of stuff, and it has a script manager for selectively disabling plugins, also not included in SG Optimizer.

perfmatters-features

Selectively Disable Plugins – disable scripts/plugins from running on specific pages and posts (for example, disabling contact forms on all pages but the contact page, or disabling social sharing on pages). There’s a script manager included with Perfmatters if you’re already using it to remove bloat, otherwise use Asset CleanUp. This can significantly improve load times (and scores) especially if you’re running lots of plugins that don’t need to load on every single page.

Remove Unused Elementor CSS JavaScript

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

 

Multisite Settings

Check the Global Settings and Per Site Defaults in their multisite tutorial.

The following must be the same for all your sites (shown in their global settings):

  • PHP version control
  • GZIP compression
  • Browser caching
  • Memcached

SG-Optimizer-Global-Settings

Other SG Optimizer settings can be customized (shown in their per site defaults):

SG-Optimizer-Per-Site-Defaults

 

Can I Delete My Old Cache Plugin?

Yes, you can.

I don’t just say this because Hristo does, but because SG Optimizer actually does a better job of optimization than WP Rocket and uses server-side caching.

SG-Optimizer-vs-Cache-Plugins

SG-Optimizer-Duplicate-Functionality"SG-Optimizer-Duplicate-Functionality"

 

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:

SiteGround-SG-Optimizer-Duplicate-Functionality

 

Did I Miss Anything?

For the record, I wouldn’t use SiteGround.

WordPress Hosting Pingdom Load Time Test
Cloudways DigitalOcean was the fastest host in speed tests (view Pingdom report) and is who I use/recommend

See Also: My Full WordPress Speed Optimization Guide

Cheers,
Tom

About Tom Dupuis

Tom Dupuis 2017Tom 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.

Subscribe
Notify of
guest
38 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments