WP Rocket’s settings haven’t changed much over the years, considering they only released 1 new feature after 2020 if you check the changelog.
That said, WP Rocket/RocketCDN do a poor job optimizing LCP, TTFB, and mobile. You can’t preload above the fold images for LCP and the “remove unused CSS” feature is slower than other plugins because it loads used CSS inline. RocketCDN only serves files from StackPath’s CDN and basically nothing else. There’s no full page caching, mobile image resizing, and other important features. Since TTFB is 40% of LCP, I see many WP Rocket users complain about this.
With so many lacking features, you’re basically forced to use 6 other plugins to address these, including Perfmatters which handles several of them. I switched to FlyingPress which is faster with more features (Gijo also constantly updates it for web vitals), but I’ll leave that up to you.
This guide goes beyond regurgitating their documentation and covers advanced image optimizations, CDN choices, CPU usage, etc. It’s also 8+ years old and I’ve been keeping it updated since I first published it. Lmk if you have any questions/feedback in the comments.
- Dashboard
- Cache
- File Optimization
- Media
- Preload
- Advanced Rules
- Database
- CDN
- Heartbeat
- Add-Ons
- Cloudflare
- Image Optimization
- Tools
- Helper Plugins
- High CPU Usage
- Plugins you need with WP Rocket
- Configure Perfmatters with WP Rocket
- Configure SiteGround Optimizer with WP Rocket
- WP Rocket vs. FlyingPress vs. SG Optimizer
- Reduce TTFB/LCP with non-garbage hosting
Affiliate Disclaimer – I use aff links and you can get 10% off on their coupons page.
1. Dashboard
General information about your subscription to WP Rocket and RocketCDN. I never let plugins collect data since it results in a (very small) performance decrease. You can clear cache if you make design changes and aren’t seeing them. Otherwise, there’s nothing to do here. I let my subscription expire after switching cache plugins, especially considering they increased prices.
2. Cache
There are a handful of situations where WP Rocket’s page caching should be disabled using the helper plugin:
- When your host already handles page caching.
- When you’re using Super Page Cache for Cloudflare.
- When you’re using another cache plugin for page caching.
Brian Li explains why WP Rocket’s page caching should be left on when using APO (it’s a different layer than page caching on the origin server). Which means in most cases, keep caching On. I don’t recommend using 2 cache plugins unless you’re using SG Optimizer for caching, then WP Rocket for core web vitals. In this case, disable WP Rocket’s page caching.
WP Rocket has specific instructions and helper plugins when using NGINX + Varnish, such as using the NGINX helper plugin when NGINX caching is enabled and using custom Varnish IPs.
Mobile Cache: On – enables caching for phones (tables are treated the same as desktop but can be changed with a helper plugin). The only reason mobile cache should be off is if your website isn’t responsive. Check the documentation if you’re seeing the wrong display on certain devices.
Separate Cache Files For Mobile Devices: Off – only enable if you have mobile-specific elements and need WP Rocket to show them using a separate mobile cache, or in situations like if you’re using the Avada theme / WP Touch. Otherwise, you should keep this setting turned off.
User Cache: Off – only enable if you have logged-in users (i.e. bbPress) where there’s user-specific content. However, enabling this can also increase CPU usage. If you turn this on and have custom login and logout pages, make sure those are excluded from the cache. If this is turned on, there are several helper plugins to get user cache working properly such as force page caching, disable page caching for logged-in users, and common cache for logged-in users.
Cache Lifespan: 24 hours – a lower number means the cache refreshes frequently but increases CPU usage (good if you publish content frequently and need your site updated). A higher number means the cache won’t refresh as frequently which can decrease CPU usage (good if you don’t publish content often and want to save server resources). If you’re getting CPU issues, you can also use WP Rocket’s helper plugin to disable automatic cache clearing.
3. File Optimization
For most sites, minify CSS/JS should be ON, but combine CSS/JS should OFF. Defer/delay JavaScript should usually both be ON and can improve multiple PageSpeed recommendations.
If you plan on using Perfmatters to remove unused CSS (which is faster and more reliable than WP Rocket’s), leave all CSS settings OFF and only use the JS settings.
Minify CSS/JS Files: On – leave Off if you’re using Perfmatters to remove unused CSS. Minifying files removes whitespace from code and which reduces file sizes. When using Cloudflare’s APO, Cloudflare suggests using WP Rocket for minification and leaving Cloudflare minify settings OFF.
Combine CSS/JS Files: Off – this setting doesn’t work when “delay JavaScript execution” is on. WP Johnny also explains why you shouldn’t combine especially on websites with large CSS/JS files (which you can check in your GTmetrix Waterfall chart). Combining CSS/JS files can also cause issues when using HTTP/2 and HTTP/3 servers. For all these reasons, leave this setting off.
Excluded CSS/JS Files: if enabling a minify setting breaks your website, view your source code, find the problematic file, and add it here. See WP Rocket’s post on resolving minification issues.
Optimize CSS Delivery: Remove Unused CSS – leave Off if you’re using Perfmatters to remove unused CSS. Even after WP Rocket revamped this in 3.11, it still loads used CSS inline. While this is better for scores, it’s slower for users since the file can’t be cached and it increases HTML size. Even the Perfmatters documentation says inline is better for PageSpeed scores while “separate file” is better for perceived performance. FlyingPress, Perfmatters, and LiteSpeed Cache all load used CSS in an external file, while WP Rocket is the only cache plugin I know that loads it inline.
If removing unused CSS in WP Rocket breaks your site, load CSS asynchronously (but it won’t give you as good of results). Once enabled, run your site through a critical CSS generator, copy the code, then paste it into fallback critical CSS (if you make CSS changes to your site, you’ll need to repeat this step). And if you’re still getting errors, use the helper plugin to exclude files.
Large CSS/JS files are usually from themes/plugins which you can check in your Chrome Dev Tools coverage report. Rather than relying on a plugin to fix these, you’ll have better results if you fix it at the source (by using lightweight themes/plugins and optimizing third-party code).
Load JavaScript Deferred: On – loads JavaScript after the page has finished parsing and eliminates render-blocking resources in PSI. If you still see render-blocking issues, you can try installing Async JavaScript on top of WP Rocket then toggling on “apply defer” in the settings.
Delay JavaScript Execution: On – reduces third-party code by delaying JavaScript until user interaction (such as scrolling or touching the screen on mobile). If this breaks your website, view WP Rocket’s compatibility exclusions and exclude any plugins/themes/services from delay.
This can significantly improve multiple areas of core web vitals. You could also use the Flying Scripts plugin which lets you add JavaScript manually and delay it using a timeout period, but WP Rocket works well. And remember, enabling this will disable and gray out combine settings.
4. Media
Enable all settings and exclude above the fold images from lazy load. But, we have a problem:
WP Rocket can’t lazy load CSS background images. There’s also no simple solution to exclude above the fold images from lazy load besides using helper plugins or excluding class names/attributes. It also can’t preload images. If you plan on using Perfmatters for lazy load (which does all these), leave the settings off in WP Rocket.
Lazy Load Images: On – delays loading images until users scroll down the page and they become visible in the viewport. WP Rocket won’t lazy load background images since they’re loaded from CSS, resulting in defer offscreen images errors. That said, you have a few options:
- Perfmatters lazy loads CSS background images (also use perfmatters-lazy-css-bg class).
- GeneratePress can now inline background images in which case, they will be lazy loaded.
- Optimole lazy loads them using CSS selectors (you’ll use Chrome Dev Tools to find them).
- Add your own lazy-bg class – or switch to FlyingPress which already has this class built-in.
Enable For Iframes And Videos: On – similar to lazy loading images but for iframes/videos.
Replace YouTube Iframe With Preview Image: On – replaces the “fat YouTube player” with a preview image so it’s only loaded when people click it. It can significantly improve load times when embedding videos. However, you may see external requests from ytimg.com which are from the thumbnails. FlyingPress is the only plugin I know that self-hosts YouTube placeholders.
Exclude Images Or Iframes – it’s counterintuitive to lazy load above the fold images/iframes since visitors see them immediately. WP Rocket can exclude images by URL, class, attribute, or:
- Perfmatters can preload critical images where you set the number of images that usually load above the fold (i.e. 2-3) so they’re excluded from lazy load + preloaded automatically.
- WP Rocket can exclude images by URL, class, or attribute. For example, featured images can often be excluded by adding “class=”attachment-full size-full”. There’s also a helper plugin to exclude a specific number of images from lazy load (but read their instructions).
- There are a few plugins out there to preload images, featured images, or product images.
Add Missing Image Dimensions: On – adds missing width/height attributes to HTML images. This fixes layout shifts as well as use explicit width and height on image elements in PSI. When viewing your image’s HTML, it should now have a width and height with specified dimensions:
<img src="example.png" width="680" height="680" />
WP Rocket + RocketCDN don’t compress images, use WebP, or resize them for mobile. See the image optimization section for better alternatives than Imagify.
5. Preload
Learn how to reduce CPU usage by preloading only important sitemap URLs and changing the crawl interval, how to preload fonts, and why you (usually) don’t need to prefetch any domains.
Activate Preloading: On – tells browsers to start fetching resources needed soon. If you’re getting high CPU usage, install the custom preload intervals helper plugin and change the crawl interval from the default 500ms to something like 1000ms. You could even set up a cron job so WP Rocket starts preloading at a specific time (i.e. in the middle of the night / low traffic hours).
Activate Sitemap-Based Cache Preloading: On – preloading the full sitemap increases CPU usage. Check your sitemap (i.e. https://example.com/sitemap_index.xml) and only add the most important URLs to cut down on CPU usage. In most cases, this is just your pages/posts.
Preload Links: On – when users hover over a link for more than 100ms (or touches the link on mobile), the page will download in the background so when users click it, it appears to load instantly. This won’t improve scores but helps with perceived load time. The problem is if you have a site where users hover over lots of links (i.e. product images), it can cause CPU spikes.
Prefetch DNS Requests – check the sources tab of Chrome Dev Tools to see all third-party hostnames loading on your website. Most of these are already delayed (via delay JavaScript execution), so there’s no reason to prefetch them. WP Rocket automatically preconnects CDN CNAMEs + fonts.gstatic.com, so there’s no reason to prefetch these either. The only third-party domains you should prefetch are the ones not delayed or preconnected by WP Rocket. In most cases, this is only a couple domains or even 0. While preloading/preconnecting too many URLs can negatively impact on speed, prefetch is more forgiving if you add domains not being used.
Preload Fonts – you don’t need to do anything here if remove unused CSS is on since WP Rocket will preload fonts automatically. If it’s not on, you’ll need to preload fonts manually.
Only self-hosted fonts can be preloaded (fonts served from your site, not fonts.gstatic.com). Even though they’re faster and more GDPR compliant, WP Rocket recommends using third-party fonts (I don’t, and neither does basically anyone). Elementor can host fonts locally in Theme Customizer → Performance. There are several other plugins that do this, like OMGF.
Once fonts are hosted locally, open your GTmetrix Waterfall chart and view all your font files. Find any fonts loading above the fold or mentioned in your CSS file, copy their URLs, and paste them in WP Rocket to preload them. Retest your website in GTmetrix and you should notice the font’s blocking time is faster. Avoid preloading too many fonts which can have a negative effect. PSI used to tell you which fonts to preload in preload key requests, but I don’t think it does now.
6. Advanced Rules
There are only a handful of situations where you need to use WP Rocket’s advanced rules, but the high majority of websites can leave these as-is. WP Rocket is already compatible with most eCommerces sites (i.e. WooCommerce) and excludes the cart, checkout, and my account pages.
Never Cache URLs – if you’re using an eCommerce shopping cart that is not supported by WP Rocket, add your cart and checkout pages here which will exclude these pages from the cache.
Never Cache Cookies – same principle as previous option only based on cookies.
Never Cache User Agents – prevent Googlebot or other user agents from caching pages.
Always Purge URLs – let’s say you have a blogroll on your homepage. If you create a new post, you want that homepage blogroll updated immediately by emptying the homepage cache. That’s what this setting does, however WP Rocket automatically clears the cache for your homepage, categories and tags once new content is created… so there is usually no need for this. But if there are other page’s cache you want cleared when new content is posted, add it.
Cache Query Strings – query strings are URLs that look like this: ?country=italy. These URLs aren’t cached by default but if you want to cache them, add “country” in the field (for example).
7. Database
WP-Optimize is better for database cleanups, so jump down to that section.
- Revisions: Off – every time you hit the “Publish” button, a post revision is stored. Instead of deleting all them which leaves you with no backups, they should be limited to maybe 3-10. You can do this by adding the code below to your wp-config file, or using WP-Optimize.
define('WP_POST_REVISIONS', 5);
- Auto Drafts: Off – if you exit out of your browser accidently, WordPress will store auto drafts so you don’t lose your work. If you’re sure you don’t have any, you can delete them.
- Trashed Posts: On – posts/drafts you deleted.
- Spam Comments: On – comments marked as spam.
- Trashed Comments: On – comments marked as trash.
- Expired Transients: On – transients that expired and are still in your database.
- All Transients: On – stores data that takes a long time to retrieve (i.e. blog social counts).
- Optimize Tables: On – optimizes database tables but doesn’t work on the InnoDB engine.
- Automatic Cleanup: Weekly – although you should take backups beforehand just in case.
WP-Optimize – better than WP Rocket because it can remove unused tables, take backups via UpdraftPlus, and save a certain amount of post revisions instead of deleting them all. Just by viewing these tables, you can learn which plugins/modules add the most database overhead. This is common with SEO plugins, security plugins, and other plugins that collect/process data.
8. CDN
Here are specs of popular CDNs.
RocketCDN | SiteGround CDN | FlyingCDN By FlyingPress | FlyingProxy Cloudflare Enterprise | Cloudways Cloudflare Enterprise | Rocket.net Cloudflare Enterprise | |
---|---|---|---|---|---|---|
CDN | StackPath | SiteGround | BunnyCDN | Cloudflare | Cloudflare | Cloudflare |
Speed (Tbps) | 100 | Not listed | 80 | 192 | 192 | 192 |
Locations | 73 | 176 | 114 | 285 | 285 | 285 |
Full page cache | x | ✓ | x | APO | x | APO |
HTTP/3 | x | x | x | ✓ | ✓ | ✓ |
Brotli | x | ✓ | ✓ | ✓ | ✓ | ✓ |
Priority routing | x | x | x | ✓ | ✓ | ✓ |
Smart routing | x | Anycast | x | SmartEdge | Argo | Argo |
Load balancing | x | ✓ | x | ✓ | ✓ | ✓ |
WAF | x | x | ✓ | ✓ | ✓ | ✓ |
Anti-DDoS | x | x | ✓ | ✓ | ✓ | ✓ |
Image optimization | x | Limited | Bunny Optimizer | Mirage/Polish | Mirage/Polish | Mirage/Polish |
Compression | x | ✓ | ✓ | ✓ | ✓ | ✓ |
WebP | x | x | ✓ | ✓ | ✓ | ✓ |
Mobile resizing | x | x | ✓ | ✓ | ✓ | ✓ |
Bandwidth | Not unlimited as advertised | Unmetered | Unlimited | 100GB | 100GB | Determined by hosting plan |
Price | $8.99/mo | $7.49/mo | $.03/GB | $10/mo | $5/mo | Free w/ hosting |
From best to worst:
- Rocket.net Cloudflare Enterprise – you hit 2 birds with 1 stone between arguably the best CDN, plus their hosting is faster than “premium hosts” like Kinsta. Their Cloudflare Enterprise is free and setup automatically. It uses full page caching (not supported on Cloudways) and Argo (not supported on FlyingProxy). But, you have to switch your host.
- FlyingProxy – third-party Cloudflare Enterprise service by Gijo (from FlyingPress) and a big step up from Cloudflare free/pro since it uses all 285 Cloudflare PoPs, load balancing, and other Enterprise features. The main con is no Argo (which is great for dynamic sites).
- Cloudways Cloudflare Enterprise – similar to Rocket.net and FlyingProxy but no APO support, costs $5/mo, and last time I checked, it served lots of annoying challenge pages.
- Cloudflare Pro – full page caching with APO and Mirage/Polish for image optimization.
- FlyingCDN – FlyingPress’ CDN which uses BunnyCDN with Bunny Optimizer (for image optimization) and geo-replication for cheaper than going through BunnyCDN ($.03/GB).
- SiteGround CDN – as much as I dislike their hosting, they made big improvements to the CDN in version 2 with more locations and load balancing, but it still lacks many features.
- BunnyCDN – performant CDN on cdnperf.com with lots of settings like Bunny Optimizer (for image optimization) and geo-replication. Cloudflare + BunnyCDN is another option which can improve cache hit ratio and better image optimization from Bunny Optimizer.
- RocketCDN – only serves your files from StackPath’s CDN (which was removed from cdnperf.com) with no support for full page caching, image optimization, security features.
How you setup your CDN depends on which service you use. CDNs that use CDN URLs (i.e. BunnyCDN/RocketCDN) can be setup with WP Rocket. Cloudflare APO is setup through the Cloudflare plugin. Rocket.net’s is automatic, and FlyingProxy has video instructions. I also have a dedicated section for configuring Cloudflare.
This next section is for BunnyCDN which many people use with WP Rocket:
Step 1: Sign up for BunnyCDN and add code OMM5 to the billing section for $5 in free credits.
Step 2: Create a pull zone, add your website name, and choose your regions.
Step 3: Copy your CDN URL or set up a custom hostname like cdn.exmaple.com (optional).
Step 4: Paste the CDN URL in WP Rocket’s CDN CNAME(s) field.
Step 5: Install the BunnyCDN plugin and add your pull zone name. Doing this and adding your CDN URL to WP Rocket can serve more assets and was recommended by BunnyCDN’s support.
Step 6: Purge cache and view your source code to make sure files are served from the CDN.
Step 7: Change any URLs in your WP Rocket settings to match your new CDN URL from BunnyCDN (excluded images, preload fonts, etc). For example, an excluded image would look something like: https://cdn.onlinemediamasters.com/wp-content/uploads/2022/05/logo.png
Step 8: Consider BunnyCDN’s geo-replication which automatically copies your files to their storage zones so files are pulled from the closest zone. It’s found in Caching → Perma-Cache.
Once you enable perma-cache, go to Storage → Add Storage Zone. Give your storage zone a name (your business name is fine), select your main storage region, then click “Enable Geo-Replication.” You will be prompted to select the regions where you want your files to be replicated. The price is $0.010/GB for the first 2 regions (including your main storage region) then $0.005/GB for each additional region. Just use the regions where you have lots of visitors.
When you’re done, click “Add Storage Zone.”
Now if you click your storage name (ommstorage), you’ll get a new set of menus where you can use the file manager to upload/access files from your edge storage zone, error handling settings, and the replication tab where you can add more storage zones in case you ever want to expand.
The last (optional) step would be to set up Bunny Optimizer for image optimization. Otherwise, you’re done!
Exclude Files From CDN – lets you serve files locally instead of the CDN. Usually, these files come from plugins designed to disregard cross domain load. In most cases, there is no need.
Example:
- {uploads_dir}/wpcf7_captcha/*
- {uploads_dir}/imagerotator.swf
- {plugins_dir}/wp-fb-autoconnect/facebook-platform/channel.html
9. Heartbeat
Heartbeat shows you when other users are editing a page/post, real-time plugin notifications, etc. Disabling/limiting it in certain areas can decrease CPU usage since it runs every 15-60s by default. I recommend disabling Heartbeat in the backend and frontend, then reducing activity (to 120s) in the post editor since you want to keep things like autosaves and similar functions.
- Backend: Disable
- Post Editor: Reduce activity
- Frontend: Disable
10. Add-Ons
Enable the add-ons you use.
Varnish – only turn on if your host uses Varnish. This is turned on automatically for some hosts using Varnish (Cloudways, Flywheel, WP Engine) and off if using SiteGround, Kinsta, Pressable.
WebP Compatibility – disable in most cases. Even if you use WebP, it should be disabled when using a CDN, .htaccess rules, or <picture> elements to serve WebP images (also disable when using Optimole, ShortPixel Adaptive Images, or WebP Express). WP Rocket doesn’t create WebP images (I use BunnyCDN) so it’s just for compatibility reasons. If you notice images aren’t being served in WebP, try their helper plugin to force images which are using unsupported attributes.
Cloudflare – enable when using Cloudflare but leave off when using APO. The modify options have more settings to add your global API key, Cloudflare email, and Zone ID (for compatibility). No, that’s not my real Cloudflare API key shown in the screenshot – but thanks for looking out :)
- Global API Key – found in your Cloudflare dashboard here.
- Account Email – same email used in your Cloudflare account.
- Zone ID – found in the Overview tab of your Cloudflare dashboard.
- Development Mode: Off – only use when making lots of code changes to your site.
- Optimal Settings: On – activates WP Rocket’s recommended Cloudflare settings which include the following changes: set the caching level to standard, enable auto minify for JavaScript, CSS and HTML, disable Rocket Loader, set browser cache expiration to 1 year.
- Relative Protocol: Off – only used for flexible SSL, but full SSL is preferred.
- Clear All Cloudflare Cache Files – Cloudflare’s cache should be purged automatically when WP Rocket’s is, but if you need to do it manually for some reason, you can do it here.
Sucuri – only enable if you’re using Sucuri’s firewall which clears Sucuri’s cache when WP Rocket’s cache is cleared. Modifying options prompts you to enter your Sucuri Firewall API Key.
11. Cloudflare
This section talks about Cloudflare, APO, and configuring Cloudflare’s dashboard. You don’t need to do this if you setup Cloudflare Enterprise via Rocket.net, Cloudways, or FlyingProxy.
Cloudflare APO – you can setup APO using the Cloudflare plugin, then disable the Cloudflare add-on in WP Rocket. Some people use the cache everything page rule or Super Page Cache for Cloudflare, but they’re not the same and cache everything can have admin bar issues. Is APO worth $5/mo? Yes… I would test your site in KeyCDN’s Performance Test and do a benchmark before/after APO. It caches HTML and you should see a TTFB improvement in several locations.
Step 1: Sign up for Cloudflare. Some hosts let you add Cloudflare directly in your hosting account, but the settings are limited. The only exception I would do this is if you’re using Enterprise. Otherwise, add your website to Cloudflare and they’ll assign you 2 nameservers.
Step 2: Change nameservers in your domain registrar to Cloudflare’s.
Step 3: In Cloudflare’s DNS settings, change your website from DNS Only to Proxied. This activates their CDN by proxying traffic and is required to use APO as well as other features.
Step 4: If you’re not using APO, turn on the Cloudflare add-on in WP Rocket, click “modify options,” then fill out your Cloudflare information (already explained in the add-ons section).
Step 5: If you plan on using APO, follow Cloudflare’s instructions or use mine:
Setting Up Cloudflare APO With WP Rocket
- Use KeyCDN to benchmark TTFB in 10 locations.
- Disable Cloudflare add-on in WP Rocket.
- Keep caching enabled in WP Rocket which is a different layer.
- Keep minification on in WP Rocket and leave it off in Cloudflare.
- Make sure traffic is proxied through Cloudflare (required for APO).
- Purchase APO in your Cloudflare dashboard.
- Install the Cloudflare plugin.
- Create an API token and add it to the Cloudflare plugin.
- Purge cache in WP Rocket, then in Cloudflare.
- Confirm APO is working using uptrends.com.
- Retest your site in KeyCDN to compare results.
Step 6: Configure your Cloudflare dashboard.
Free Cloudflare Settings
- DNS – one of the fastest and most reliable DNS providers on dnsperf.com.
- CDN – in your DNS settings, change your website from DNS only to proxied.
- TLS 1.3 – fastest TLS protocol (I recommend setting min. TLS version to 1.2).
- Bot Fight Mode – block spam bots which are logged into your firewall events.
- Early Hints – early preload/preconnect hints which improves server wait time.
- Crawler Hints – tells crawlers if content is updated to prevent wasteful crawls.
- Page Rules – here’s a screenshot of 3 common page rules for WordPress sites.
- Firewall Rules – another screenshot of 4 common firewall rules for WordPress.
- HTTP/3 With QUIC – delivers website from faster HTTP/3 (use a HTTP/3 test).
- Hotlink Protection – stops websites from copying images and using bandwidth.
- Zaraz – offloads third-party scripts to Cloudflare (Google Analytics, Ads, others).
- SXGs – prefetches content so it loads faster when your site is clicked in Google.
Paid Cloudflare Add-ons
- APO – caches HTML and can improve TTFB in multiple global locations.
- Argo – avoids congestion by routing traffic through fastest network paths.
- Mirage + Polish – I prefer using Cloudflare to optimize images instead of plugins.
- Load Balancing – traffic is re-routed to healthier and faster origin servers. It’s also known as geo-based routing and is similar to the BunnyCDN perma-cache feature.
- Rate Limiting – protects site + reduces bandwidth by stopping excessive requests.
Step 7: Check your Cloudflare Analytics in a few days to see how much bandwidth is being offloaded, along with other analytics. BunnyCDN may be doing some of the heavy lifting too.
12. Image Optimization
Unfortunately, WP Rocket doesn’t optimize images besides the lazy load settings.
For other image optimizations like compression/WebP, Optimole is better than Imagify because it resizes images for mobile (which can improve mobile LCP), supports AVIF, and has viewport + network-based optimizations like serving lower quality images on slow connections. However, image CDNs are better than plugins since they optimize images “on the fly” without adding bloat (such as backups). They’re also less taxing on your server and don’t use resources.
WP Rocket recommends Imagify because it’s their plugin. But just like WP Rocket/RocketCDN, it’s meant to be easy with lacking features. If you go this route, you ideally want to use it to compress images with about an 85% compression level. You could also optimize images before uploading them in Photoshop or other tools, but this doesn’t address mobile resizing, AVIF, etc.
Imagify | ShortPixel | Optimole | SiteGround CDN | Bunny Optimizer | Mirage/Polish | |
---|---|---|---|---|---|---|
Compression | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
WebP | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Mobile resizing | x | SP Adaptive Images | ✓ | x | ✓ | ✓ |
AVIF support | x | ✓ | ✓ | x | x | ✓ |
Serve images from CDN | x | SP Adaptive Images | Cloudfront | Google Cloud | ✓ | ✓ |
No server use | x | x | x | x | ✓ | ✓ |
No bloat | x | x | Offloading | x | ✓ | ✓ |
Price | Free 20MB/mo then $9.99/mo | Free 100 credits/mo then $3.99/mo | Free 5,000 visits/mo then $19.08/mo | $14.99/mo | $9.5/mo or $.03/GB w/ FlyingCDN | Free with Rocket.net |
13. Tools
Import or export your WP Rocket settings, or rollback to the previous version.
Export Settings – export your settings to use on multiple sites.
Import Settings – import your pre-configured WP Rocket settings.
Rollback – if you updated WP Rocket and it caused issues, fall back to the previous version.
14. Helper Plugins
WP Rocket’s helper plugins are listed on Github or you can do a Google search for them. I tried to list some of the most common helper plugins in this guide, but there are quite a few others.
15. High CPU Usage On WP Rocket
Some of my recommended WP Rocket settings should already help reduce CPU usage, like increasing cache lifespan and only preloading your important sitemap URLs. WP Rocket’s documentation also recommends setting up a cron job to clear WP Rocket’s cache/preload during low traffic hours, decreasing the remove unused CSS processing batch, or disabling preload completely. Beyond the documentation, here are a few other tips to reduce CPU usage:
- Leave SiteGround (they have awful limits).
- Offload as much bandwidth as you can to CDNs.
- Block bad bots using Cloudflare’s bot fight mode.
- Find slow plugins/bottlenecks using Query Monitor.
- Use hotlink protection to stop people from copying images.
- On top of Heartbeat, limit post revisions and autosave interval.
- Keep your PHP, WordPress, MySQL, and other software updated.
16. Plugins You Need With WP Rocket
- Perfmatters – remove bloat, better image optimization when it comes to preloading and background images, faster remove unused CSS, and a script manager to unload CSS/JS. In case you don’t want to pay for it, you can try plugins like Preload Images + Asset CleanUp.
- Optimole – more optimizations than Imagify and ShortPixel, but image CDNs are better.
- ShortPixel Adaptive Images – if you’re using ShortPixel, this is needed to resize images for mobile, use ShortPixel’s CDN, and other features which are listed on the plugin page.
- Cloudflare or BunnyCDN Plugin – assuming you’re not using RocketCDN, you’ll probably be using Cloudflare or BunnyCDN (or both) who each have their own plugin (BunnyCDN plugin for setting up BunnyCDN as well as Cloudflare’s plugin for adding Cloudflare APO).
- Exclude LCP Images From Lazy Load – their helper plugin excludes a set number of above the fold images from lazy load for better LCP, instead of excluding them manually.
- Redis Plugin – while other plugins like LiteSpeed Cache have an option to connect Redis, WP Rocket doesn’t, so you’ll need to install a separate plugin. The first step is to enable it in your hosting account, download the Redis plugin recommended by your host, then use it to connect. Most hosts support Redis, Memcached, or both (Redis has more advantages).
17. Configure Perfmatters With WP Rocket
Configure WP normally, then disable everything in Perfmatters except these settings:
General Settings – mostly for bloat removal and limiting things like post revisions, autosave interval, and tweaks that can also reduce CPU usage. The only duplicate feature is Heartbeat Control, so only use one plugin for that. Otherwise, the screenshot shows the same setting I use.
Remove Unused CSS – if real world browsing speed is more important than scores, use Perfmatters to remove unused CSS with the “file” method and disable it in WP Rocket. I also emailed Brian from Perfmatters who said to disable all CSS settings in WP Rocket when using it.
Preload Critical Images – WP Rocket can’t preload images, so do it in Perfmatters. Set the number of images that usually load above the fold (usually 2-3) and they’ll be preloaded. You don’t need to enable lazy load in Perfmatters to use it, and there’s no need to use WP Rocket’s helper plugin to exclude a set number of images (Perfmatters does it with these automatically).
CSS Background Images – Perfmatters makes it easy to lazy load CSS background images which includes a perfmatters-lazy-css-bg helper class you can add to additional CSS classes. Again, you can use WP Rocket’s lazy load and keep Perfmatters’ off while still using this feature.
Preload – since WP Rocket only preloads fonts, you can use Perfmatters to preload CSS, JavaScript, and other file types. One example is preloading wp-block-library if you’re using Gutenberg (or if you’re not using Gutenberg, you can disable its CSS file in the script manager).
Script Manager – removes unused plugins or single CSS/JS files on pages they’re not used, which can reduce CSS/JS. Enable the script manager in the Assets settings, go to your script manager settings, then enable test mode + display dependencies. Test mode lets you test the script manager without breaking your site by only showing changes to logged-in admins, but disable it when you’re done when you’re ready to publish changes. Display dependencies lets you see all plugins using jQuery in your script manager, which you should avoid when possible.
18. Configure SiteGround Optimizer With WP Rocket
WP Rocket addresses core web vitals better than SiteGround Optimizer, so I recommend only using SiteGround Optimizer for all 3 caching options, then disabling WP Rocket’s page caching using their helper plugin (so it doesn’t overlap with file-based caching). Then, you’ll configure WP Rocket normally, but leave all other settings disabled in SiteGround Optimizer. If you want, you can still use it for image compression/WebP. WP Rocket also has their own documentation.
19. WP Rocket vs. FlyingPress vs. SG Optimizer
This is why I swapped WP Rocket for FlyingPress:
SG Optimizer | WP Rocket | FlyingPress | LiteSpeed Cache | |
---|---|---|---|---|
Server-side caching | ✓ | x | x | ✓ |
Object cache integration | ✓ | x | x | ✓ |
Delay JavaScript | x | ✓ | ✓ | ✓ |
Remove unused CSS | x | Inline | Separate file | Separate file |
Critical CSS | x | ✓ | ✓ | ✓ |
Preload critical images | x | x | ✓ | x |
Exclude above the fold images | By class/type | By URL/class | Automatic | Automatic |
Lazy load background images | x | Inline HTML | lazy-bg class | x |
Add missing image dimensions | x | ✓ | ✓ | ✓ |
Lazy load iframes | x | ✓ | ✓ | ✓ |
YouTube iframe preview image | x | ✓ | ✓ | ✓ |
Self-host YouTube placeholder | x | x | ✓ | x |
Host fonts locally | x | x | ✓ | ✓ |
Font-display: swap | x | ✓ | ✓ | ✓ |
Preload links | x | ✓ | ✓ | ✓ |
Bloat removal (beyond Heartbeat) | x | x | ✓ (read details) | x |
Lazy render HTML elements | x | x | ✓ | ✓ |
Guest Mode | x | x | x | ✓ |
Advanced cache control | x | x | x | ✓ |
Gravatar cache | x | x | x | ✓ |
Limit post revisions | Delete all | Delete all | Delete all | Keep some |
CDN | Google Cloud | StackPath | BunnyCDN | QUIC.cloud |
CDN PoPs | 176 | 73 | 114 | 80 |
Full page caching | ✓ | x | x | ✓ |
CDN geo-replication | x | x | ✓ | x |
CDN image optimization | x | x | ✓ | ✓ |
CDN image resizing for mobile | x | x | x | ✓ |
CDN DDoS protection | x | x | ✓ | ✓ |
CDN bandwidth | Unmetered | Very limited | Unlimited | Unlimited |
Documented APO compatibility | x | x | ✓ | x |
Documentation | Not detailed | Good | Not detailed | Good |
New features | Infrequent | Infrequent | Frequent | Frequent |
Facebook group | Join | Join | Join | Join |
CDN price | $14.99/mo | $8.99/mo | $.03/GB | $.02-.08/GB |
Plugin price | Free | $59/year | $60/year | Free |
Renewal price | Free | $59/year | $42/year | Free |
View tutorial | View tutorial | View tutorial |
20. Reduce TTFB/LCP With Non-Garbage Hosting
In 2019, I moved from SiteGround to Cloudways Vultr HF and posted my results. In 2022, I moved to Rocket.net with Cloudflare Enterprise which landed me a <100ms global TTFB in KeyCDN. They’re the fastest host I’ve used in 12 years and are blowing up in Facebook groups.
If you have a poor TTFB, you need to rethink your host/CDN since those are the 2 main TTFB factors (which is also 40% of LCP). After writing bad reviews of SiteGround, Hostinger, Kinsta, and EIG, I think we can agree most hosting reviews are garbage. A good place to get unbiased feedback is the WP Speed Matters Group (run by Gijo from FlyingPress). Rocket.net doesn’t do aggressive marketing so not as many people know about them, but results are all I care about.
Good hosting plans:
FastComet FastCloud Extra | ChemiCloud WordPress Turbo | NameHero Turbo Cloud | Cloudways Vultr HF (2GB) | Rocket.net Starter Plan | |
---|---|---|---|---|---|
Type | Shared | Shared | Shared | Cloud | Private cloud |
Server | LiteSpeed | LiteSpeed | LiteSpeed | Apache + Nginx | Apache + Nginx |
Cores/RAM | 6 cores/6GB | 3 cores/3GB (scalable to 6/6) | 3 cores/3GB | 1 core/2GB | 32 cores/128GB |
Storage | 35GB SATA | 40GB NVMe | Unlimited NVMe | 64GB NVMe | 10GB NVMe |
Object cache | Memcached | Memcached | Redis | Redis Pro | Redis |
PHP processor | LiteSpeed | LiteSpeed | LiteSpeed | FPM | LiteSpeed |
PHP workers | Resource limits | Resource limits | Resource limits | Unlimited | Unlimited |
Database | MySQL | MariaDB | MariaDB | MariaDB | MariaDB |
CDN | QUIC.cloud ($.02-.08/GB) | QUIC.cloud ($.02-.08/GB) | QUIC.cloud ($.02-.08/GB) | $5/mo Cloudflare Enterprise | Free Cloudflare Enterprise |
CDN locations | 80 | 80 | 80 | 285 | 285 |
Full page caching | ✓ | ✓ | ✓ | x | ✓ |
Smart routing | Anycast | Anycast | Anycast | Argo/Tiered Cache | Argo/Tiered Cache |
Optimize images | QUIC | QUIC | Mirage/Polish | Mirage/Polish | Mirage/Polish |
DNS | Use QUIC’s DNS | Use QUIC’s DNS | Use QUIC’s DNS | DNS Made Easy (use Cloudflare) | Cloudflare |
Cache plugin | LiteSpeed Cache | LiteSpeed Cache | LiteSpeed Cache | Use FlyingPress | Use FlyingPress |
Data centers | 11 | 11 | US + EU only | 44 | Served from Cloudflare edge |
Bandwidth or monthly visits | 92GB + 100k | Unlimited* | 50k | 2TB | 50GB + 250k |
Control panel | cPanel | cPanel | cPanel | Complex | Easy to learn |
Email storage | 2.048GB | Unlimited | Unlimited | x | x |
Major incidents | 2022 DDoS attack | None | 2011 node outage | None | None |
Support | B | B | B | C | A |
Migrations | 3 free | 10-200 free | 1 free | 1 free + $25/site | Unlimited free |
TrustPilot rating | 4.9/5 | 4.9/5 | 4.6/5 | 4.5/5 | 4.9/5 |
Monthly price | $5.49 (1-3 years) | $6.98 (3 years) | $9.98 (3 years) | $30 (monthly) | $25 (1 year) |
- Shared LiteSpeed Hosting – FastCloud Extra, WordPress Turbo, and NameHero Turbo Cloud are all shared LiteSpeed plans with cPanel and better alternatives to SiteGround/Hostinger. NameHero and ChemiCloud have less cores/RAM but use NVMe (faster than SATA), MariaDB (faster than MySQL) and NameHero uses Redis (faster than Memcached). However, NameHero/ChemiCloud make you sign up for 3 years to get the cheapest price (FastComet is 1-3 years). With any of these, you’ll use the free LiteSpeed Cache plugin and QUIC.cloud’s CDN (great setup). For cloud VPS, Scala doesn’t charge separately for the LiteSpeed license like other VPS hosts. Immunify360 is used as a security suite on FastComet, NameHero, and Rocket.net.
- Cloudways Vultr HF – good starting point for cloud hosting with more storage + bandwidth than Rocket.net, but their Cloudflare Enterprise needs APO and serves too many challenge pages. They were acquired by DigitalOcean who raised prices, and support could be better. Still very fast between Vultr HF, NVMe, Redis Object Cache Pro, and MariaDB. Even without APO, Cloudflare Enterprise is a powerhouse for reducing TTFB with Argo Smart Routing and prioritizing routing. Mirage/Polish optimize images better than most plugins and doesn’t tax your server. Cloudflare Enterprise can also mean 3 less plugins between image, CDN, and security plugins.
- Rocket.net – only host I know that averages a <100ms global TTFB. Both their hosting and Cloudflare Enterprise have better specs. For hosting, you get more CPU cores/RAM, LiteSpeed’s PHP, NVMe, Redis, and MariaDB. For their Cloudflare Enterprise, it’s free with APO, Argo, prioritized routing, Mirage/Polish, Brotli, early hints, and Enterprise WAF. Support is also A+ (talk to Ben Gabler and his team) or watch the interview I did with him. Unlike Kinsta and WP Engine, they don’t limit PHP workers, have a 1GB memory limit, and use Redis Object Cache Pro on their business plan and up with 10x more monthly visits and unlimited free migrations. The main con is only 50GB bandwidth on the Starter plan with 10GB NVMe storage. Search their TrustPilot reviews for “TTFB” or search Facebook Groups for feedback about them. You can get $1 your first month when you checkout using code OMM1
Bad hosting plans (and bad hosts in general):
SiteGround GrowBig | Hostinger Business WP | Bluehost Choice Plus | WP Engine Startup Plan | Kinsta Starter Plan | |
---|---|---|---|---|---|
Type | Shared | Shared | Shared | Cloud | Cloud |
Server | Apache + Nginx | LiteSpeed | Apache + Nginx | Apache + Nginx | Apache + Nginx |
Cores/RAM | Not listed | 2 cores/1.5GB | Not listed | Not listed | 12 cores/8GB |
Storage | 20GB SATA | 200GB SATA | 40GB SATA | 10GB SATA | 10GB SATA |
Object cache | Memcached | Memcached | x | Memcached | Redis ($100/mo) |
PHP processor | FastCGI | LiteSpeed | FastCGI | Not listed | FastCGI |
Resource limits | CPU limits + suspensions | Low resources | Low resources | Low PHP workers + 25k visits/mo | 2 PHP workers + 25k visits/mo |
Database | MySQL | MariaDB | MySQL | Not listed | MySQL |
CDN | SiteGround CDN ($14.99/mo) | QUIC.cloud ($.02-.08/GB) | Cloudflare free | Cloudflare free + Polish | Cloudflare APO + firewall rules |
CDN locations | 176 | 80 | 285 | 285 | 285 |
Full page caching | ✓ | ✓ | x | x | ✓ |
Smart routing | Anycast | Anycast | x | x | x |
Optimize images | Very limited | QUIC | x | Polish only | x |
DNS | Blocked by Google for 4 days | Use QUIC’s DNS | Internal (use Cloudflare) | Internal (use Cloudflare) | Route 53 (slower than Cloudflare) |
Cache plugin | SG Optimizer | LiteSpeed Cache | Use FlyingPress | Use FlyingPress | Use FlyingPress |
Data centers | 10 | 8 | 6 | 14 | 35 |
Inodes | 400k | 600k | 50k | Unlimited | Unlimited |
Control panel | Site Tools | hPanel | cPanel | User Portal | MyKinsta |
Email storage | 10GB | 1GB | Unlimited | x | x |
Major incidents | TTFB, DNS, CPU issues (denies it) | Fake reviews, scams, breach | Claims of hosting terrorist sites | 2015 breach | None |
Support | C | F | C | C | B |
Migrations | $30/site | Unlimited (but screws it up) | Free on qualified accounts only | Paid (quoted) | Free on select hosts + 1 free |
TrustPilot rating | 4.6/5 | 4.6/5 (fake) | 3.7/5 | 4.5/5 | 4.2/5 |
Monthly price | $3.99 (1 year) | $3.99 (2 years) | $5.45 (1 year) | $20 (1 year) | $29 (1 year) |
Renewals | $24.99/mo | $14.99/mo | $19.99/mo | $25/mo | $29/mo |
- SiteGround – $25/mo for a shared GrowBig plan is a ripoff. Top it off with a poor cache plugin, inferior CDN than Cloudflare APO, CPU limits, and a support team that constantly lies about their issues… means you’re getting ripped off. If your LCP is high, I bet you use SiteGround Optimizer which does a poor job with web vitals, plus they’ve have TTFB issues. Their CDN requires you to use SiteGround’s DNS which was blocked by Google for 4 days. To cover up their mess, they deny everything and use Facebook group admins (who run several groups) to promote SiteGround on their behalf and act like support agents. They have “good reviews” only because of affiliates and legal threats. Check this thread about Hristo’s AMA.
- Hostinger – only cheap because they lack resources like cores, RAM, and email storage. Everyone gets drawn to their cheap prices and LiteSpeed, but have you read their scam reports and fake reviews? I would never trust them with my site. Support is horrendous and will screw up migrations, suspend your account, and pretty sure they outsource it to an ice cream truck in Lithuania. The CEO admitted to fake reviews, they’re banned from Facebook groups for voting for themselves in polls, and hired brand ambassadors who pretend to be customers. Check this poll.
- Bluehost – another host that grew from “how to start a blog” affiliates and pays WordPress to be “officially” recommended. Use a shared LiteSpeed host instead.
- WP Engine – I reached out to them about their specs, but they don’t give them out. When a host doesn’t list basic things like cores/RAM, I assume it’s not good. From my experience, they’re similar to Kinsta but even worse with pricey overages.
- Kinsta – great option if you want to go bankrupt with paid add-ons that should be free. Compared to Rocket.net, you get 16x less RAM, 10x less monthly visits, brutal PHP worker limits, and a very low memory limit of 256MB. What are you paying so much for? Slower SATA SSDs, a premium DNS that’s slower than Cloudflare’s, and staging sites that get 1 CPU core? Madness! No wonder their TrustPilot rating sunk.
- Elementor Cloud – despite advertising big brands like Google Cloud/Cloudflare, Elementor’s hosting is extremely slow. Don’t get hosting from your page builder.
- WPX – no redundancy system which already lead to a global outage they blamed on a dead CEO. Ticking time bomb, overpriced shared hosting, and not the fastest WordPress host like Matthew said (but now he lists Kinsta #1)? Marketing gimmick.
I agree:
Still have questions? Drop me a comment and I’ll get back to you as soon as I can.
Cheers,
Tom
Hey Tom, thanks for this massive guide.
I found your post and thought of converting to WP Rocket. After getting a copy of the plugin I did a regular check on VirusTotal and found it flagged for “Dropper.Bomgen.VBS.1”.
Is it still safe to use? Thanks.
This is what I found in a Facebook group post:
“It’s very unlikely WPR has a virus, it’s likely a false warning by Windows Defender as it looks for certain file types such as htaccess. They won’t publish a complaint on their Facebook page, you will need to contact them via their support channels but they will likely tell you what I did which is that it’s a false warning by WD.”
I would agree with them… I don’t think WP Rocket would cause any virus.
Any feedback on NitroPack? Good reviews, and the product seems to work well. It looks like they ramped up their support in recent months too.
I’ve stayed away from them because of multiple reports showing they’re blackhat and move things off the main thread to get better scores, but actually doesn’t improve load time as much as other cache plugins.
My website loading time has gone down in the past few days. So, I purchased WP Rocket and implemented all the above settings that you mentioned in this post. Now my website flies like a rocket.
Thanks for this beautiful post.
Awesome news, glad it worked out and cheers to a faster site.
I use WP Rocket. Nice tutorial…. my page speed now is 99 mobile / 100 desktop .
Warnings: A
<link rel=preconnect>
was found for “/assets/vendor/gstatic” but was not used by the browser. Only usepreconnect
for important origins that the page will certainly request.how to remove this type url.
To my knowledge, WP Rocket only preconnects to Google Fonts when they’re actually being used. So I suspect it’s either from another plugin or maybe you’re only using Google Fonts in some areas of your site and not others. I would check which of your speed plugins support preconnect and double check your settings to remove it. Or edit your header.php file and check if it’s there.
Thanks – so much better than the convoluted stuff WP Rocket itself puts out. Thanks again!
Appreciate that Mike, spent a lot of time on this one.
Thank you very much for your guide, which helped me solve the related problems caused by Optimize CSS Delivery.
Finally, a suggestion is that after wp-rocket3.8, the Safe Mode For jQuery has been canceled.
Ah yes, I forgot to take that out. Thank you, I updated it.
Hi, what is your Fb group name that you have mentioned in the video??
I don’t have my own Facebook Group (yet… maybe down the line). But the ones I like most are WordPress Hosting and WP Speed Matters. Gijo runs it, he’s solid.
Hi! i am experiencing problems with my facebook pixel for page view / view content / view category (all the cached pages) not same problem with add to cart checkout or pay which i guess are not cached because is dynamic for each purchase.
i tried the facebook addon but see no difference. i deleted all the fb related extentions from the javascript delay to check if i see any difference and still culdn’t fix the problem.
i see you suggested here >> Facebook Pixel – enable if using Facebook Pixel to host it locally. If you’re using Facebook Pixel, remember to optimize it in the Preload tab.
what do you mean with optimize it in the preload tab? how do i do that exactly. any other suggestion why my pixel i not working as it should?
Honestly have no clue why that recommendation was there, maybe I meant to just remember to prefetch Google Analytics. I changed that sentence, sorry about that.
For Facebook Pixel, I’m really not sure of any other way to optimize other than try hosting locally with the add-on, prefetch, and try to delay it. Have to be careful with the timing when delaying otherwise you can lose metrics. Otherwise, maybe try using a different FB Pixel plugin like this: https://wordpress.org/plugins/pixelyoursite/ …like all third-party code, Pixel will slow your site, but it shouldn’t be by much.
Hello, I’ve follow all of your guidance but, is it okay if I enable site accelerator from jetpack? which is “speed up static file load times”
I’ve seen some people use Site Accelerator in FB Groups with good results, I just haven’t used it myself. If it were me, I would avoid relying on JetPack too much and use Cloudflare or BunnyCDN instead.