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.
- SuperCacher Settings
- Environment Optimization
- Frontend Optimization
- Media Optimization
- Performance Test
- Functionality SG Optimizer Still Lacks
- Multisite Settings
- Can I Delete My Old Cache Plugin?
- Avoid Duplicate Functionality
*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.
Activating Memcached – to activate memcached, login to Site Tools and go to Speed > Caching. Note that dynamic and memcached are only available on GrowBig+.
NGINX Direct Delivery – enable.
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.
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.
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.
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.
Minify the HTML Output – fixes minify HTML in GTmetrix + PageSpeed Insights.
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.
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.
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.
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.
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.
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
Other SG Optimizer settings can be customized (shown in their 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.
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?
For the record, I wouldn’t use SiteGround.