How To Configure SiteGround’s SG Optimizer Settings (Latest Version 5.6) Including Plugins To Compensate For Lacking Features

SG Optimizer Settings

You can finally say goodbye to WP Rocket and replace it with 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.

Configuring SG Optimizer


Warning: I don’t recommend SiteGround since their price increases, CPU limits, slow TTFB, corruption in Facebook Groups, and unethical business decisions (see review).

SG-Optimizer-SuperCacher-Settings-150x150
Supercacher Settings
SG-Optimizer-Environment-Settings-150x150
Environment Optimization
SG-Optimizer-Frontend-Optimization-Settings-150x150
Frontend Optimization
SG-Optimizer-Media-Optimization-Settings-150x150
Media Optimization

 

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 Memcached – to activate memcached, login to SiteGround and go to your SuperCacher settings. Note that dynamic + memcached are only available on GrowBig+.

SiteGround-SuperCache-cPanel

Static Cachestatic cache is enabled by default for all plans. This caches static content.

SiteGround-Static-Cache

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

SiteGround-Dynamic-Cache

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,” add third party domains to prefetch, and use Ultrafast PHP which is available on SiteGround’s GoGeek and cloud hosting. SiteGround claims this can reduce TTFB by 50% and help lower CPU usage especially for sites with decent traffic.

Otherwise, use PHP 7.4.

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 – reduces load times of third party scripts which show up in PageSpeed Insights and GTmetrix (reduce DNS lookups in YSlow). Copy the URLs of your third party domains and paste them into SG Optimizer. Flying Scripts can also help – using that plugin, I was able to set a timeout for my comments (wpDiscuz + Gravatars) which reduced my post’s load times by multiple seconds.  There are plenty of ways to optimize third party scripts.

Reduce DNS Lookup Errors

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

Set Your PHP Version – use Ultrafast PHP (available on GoGeek + cloud hosting) or PHP 7.4.

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

Browser Caching – enables browser caching.

 

3. Frontend Optimization

Enable everything since these settings have the biggest impact on your GTmetrix scores.

Some settings contain warnings from SiteGround where you should check your website for visible errors. If you don’t see any, leave enabled. If you see any, the best option is to view your source code, find the problematic files, and exclude them in the defer render-blocking JS field. Otherwise, you can disable the setting(s) giving you errors, but your load time won’t be as fast.

SG-Optimizer-Frontend-Optimization-Settings

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 – item in GTmetrix but 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 your 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 nearly speed testing tools. I have never been able to improve Gravatar scores (so I have them disabled) even when testing SG Optimizer, WP User Avatar, and even the wpDiscuz Gravatar Caching options.

Cache-Gravatar-Images

 

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.

perfmatters-script-manager

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

Better Image Optimization Settings – SG Optimizer doesn’t let you control image compression level or have WebP support, while plugins like ShortPixel, Imagify, and Smush do support these.

ShortPixel-Image-Compression-Levels

Serve-Images-In-Next-Gen-Formats

 

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.

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?

And for the record, I definitely 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: How I Got 100% GTmetrix Scores

Cheers,
Tom

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