After all the years, W3 Total Cache is still a formidable caching plugin. But it's not the easiest to configure. With over 12 pages of options, many have crashed their sites due to improper setup, so I'm going to show you how to configure W3 Total Cache for a lightning fast site.
Scores and grades do not equal speed. My biggest concern is to ensure great user experience.
It doesn't matter to me whether a page takes 0.5 seconds or 8 seconds to fully load as long as the user is faced with meaningful above the fold content in under a second. In other words, the first contentful paint must be lightning fast. In the background, the page can complete loading all of the elements. This concept is known as perceived load time and it's imperative to retain users on your site.
To achieve this, you'll need great hosting and a fast caching plugin.
Hosting is still the #1 speed factor as confirmed by this WordPress optimization support article.
I'll touch on this later on but you can jump to it if you want to read about it now.
You may be able to get inconsistent bursts of speed with shared hosting if the server isn't busy but if you want consistent speed, you'll need to consider fully dedicated resources. [TIP: Don't be fooled by "semi-dedicated" hosting. There's no such thing. It's shared!]
This doesn't mean dedicated hosting. Cloudways provides the best value for money cloud hosting, with dedicated resources.
What You Can Expect
With the right W3 Total Cache settings and decent hosting, this is what you could expect to see.
- Server response (time to first byte): 51ms.
- Contentful paint: 252ms (pretty fast!).
The contentful paint time is the time it takes for the first bit of content to appear on the page and for a user to believe the page is fully loaded (perceived load time).
- Preview Mode - enable this to preview your site to ensure that your changes don't affect layout and functionality.
- Page Cache - enable to cache your site's pages and posts.
- Opcode Cache - caches PHP files to enhance speed. Enable this in order for W3TC to update the cache with each file request, thereby saving PHP from having to be restarted.
- Database Cache - Enable to cache database objects. This reduces database calls and increases speed.
- Object Cache - I would leave this alone. It is known to slow down your backend.
- Browser Cache - Enabling this allows various data to be cached in the user's browser. This increases speed tremendously because certain assets don't have to be requested from the server with each visit to a page or post. NOTE: this only benefits repeat visitors.
- CDN - allows you to enable the use of a CDN. Please don't spend money on a CDN unless you're using a good WordPress hosting provider.
- Reverse Proxy - for servers that run Varnish.
- Network Performance & Security By Cloudflare - please enable Cloudflare from the Extensions tab.
- Fragment Cache - reduces execution time for certain common operations.
Page Cache Settings
- Enable Caching for home page, feeds and SSL requests.
- Don't Cache Pages For Logged In Users - it is recommended by the developer that this be enabled.
- Don't Cache Pages For Certain User Roles - choose which user roles should not receive cached pages.
- Cache Preload - the same as a cache warmer. This preloads the cache in order to always deliver cached pages to visitors, thereby enhancing user experience. Personally, I would recommend that you disable the automatic option because this will unnecessarily use server resources when not needed. I would also limit pages to 3 for shared hosting. Enable preloading upon published events.
- Purge Policy - developer recommends to leave settings as per defaults so as not to degrade server performance.
- Rest API and Advanced Settings - leave alone.
- Rewrite URL Structure - Enable.
- Disable Minify For Logged In Users - your choice but I like to disable minification for logged in users.
- CSS - Enable and combine CSS files.
Database Cache Settings
Leave as per defaults.
Object Cache Settings
Leave as per defaults.
Browser Cache Settings
- Set Last Modified Header - Enable.
- Set Expires Header - expires headers instruct the user's browser exactly what assets to cache and how long to keep them cached before automatically clearing them.
- Set Cache Control Header - enable to encourage caching.
- Set Entity Tag Header - enable.
- Set W3 Total Cache Header - assists in identifying optimized files.
- Enable GZip Compression - very important as this compresses files for reduced size and increased speed.
- Remove Query Strings From Static Resources - enable to normalize caching of resources that contain a ?
- Don't Set Cookies For Static Files - Enable.
- Do Not Process 404 Pages - do not check this. Caching of 404 error pages reduces server load especially if have many of them.
- CSS And JS - enable everything here except for prevent caching after changing settings. The settings here are pretty much the same as for the general options.
- HTML And XML - enable everything. Settings are the same as for CSS and JS.
- Media And Other Files - enable everything except for preventing settings changes. Settings are the same as for general settings.
- Host Attachments - enable to host all attachments with the CDN, e.g. images, download files.
- Host wp-includes Files - enable.
- Host Theme Files - enable this to host your theme files.
- Host Minified CSS and JS Files - enable to offload these assets to CDN.
- Enable custom files and canonical header.
- Configuration: Objects - This is for Stackpath Signup. It will be a heck of a lot easier to sign up separately with Stackpath and then return to the settings screen to complete your link up. I'd also really appreciate the business. It helps to keep the lights on! Stackpath will cost you $10 per month.
- Configuration: Full Site Delivery - this is for Cloudflare. Best is to access Cloudflare through your Siteground user area or cPanel. It's really easy to get it set up that way. The following screen is for W3TC Cloudflare options followed with my page rule for insane speed.
- Advanced Options - enable CORS header.
First authorize your Cloudflare. You can find your global API key in your Cloudflare account > Profile Settings.
- Development Mode - enable to be able to make changes to your live content. Otherwise you will be making changes to the cache.
- Rocketloader - set to ON.
- Minify JS, CSS and HTML - enable for all.
- Server Side Exclude - enable.
- Email Obfuscation - allows you put your email address on your page but encrypt it for bots so you don't get spam.
- Hotlink Protection - prevents others from linking to your images and displaying them on their websites. This chews up your bandwidth because they're served from your server.
- Browser Integrity Check - enable.
- Always Online - enable. If your server goes down, pages will still be served to visitors from the Cloudflare cache.
- DDos Protection - enable. Protects your site from attack.
- Cloudflare IP - enable IP Geolocation and IPV6.
- SSL - very important to enable Full (https everywhere).
Cloudflare Page Rule
This page rule reduces server response time tremendously. I'v seen a change from over 200ms to below 50ms. Contentful paint times also reduce to levels that you've never seen before thereby enhancing perceived load times and user experience concomitantly.
Why I recommend Cloudways
Whether you want to believe it or not, the big G pretty much controls the internet.
Because faster sites improve user experience considerably, site speed is becoming increasingly more important as a ranking signal.
Speed optimization doesn't begin and end with installing a caching plugin. It's the culmination of a number of very important factors. Some of these are mentioned in the WordPress Optimization Guide, with hosting being first.
The #1 speed factor is hosting. #2 is a lightweight theme and #3 is caching. All other optimizations follow on from these.
Caching will certainly provide an immediate speed boost but without consistently fast hosting you'll never see its full benefits.
I firmly believe that Cloudways hosting is undoubtedly the best home for your site. It's not only blazing fast but you'll get the best value for for money hosting in the marketplace.
Why I Love And Use Cloudways
- Pay As You Use - NO CONTRACTS!
- Plans From $10 Per Month.
- 5 Cloud Providers (Digital Ocean, Google, Amazon, Linode, VULTR).
- Host Unlimited Websites.
- Fully Dedicated Resources (No deceptive marketing).
- Latest Speed Technology (SSD, HTTP/2).
- Optimized Stack With Caching (Including Memcached, Apache, Varnish, NGINX, Redis).
- FREE Breeze Inhouse Caching Plugin.
- Multiple PHP Versions And PHP 7.X Ready For Ultimate Speed.
- Cloudways CDN (Stackpath Under The Hood).
- 60+ Data Centers For Superior Performance And Global Response Times.
- 1-Click FREE SSL Certificates.
- 24/7 Live Chat And Ticketing For Unsurpassed Support.
- Comprehensive Knowledgebase.
- 1 Free Managed Migration.
- 1-Click Automated Or On-Demand Backup And Restore - Frequency From 1 Hour to 7days.
- 1-Click Revert.
- Extend And Scale Storage In A Few Clicks.
- Vertical Scaling - 1-Click Hosting Feature Scales RAM, CPU And Storage.
- Deploy Over 10 Sites In 1-Click.
- Dedicated Staging.
- Git Integration.
- 1-Click Cloning Of Entire Server Or Individual Site.
- FREE Cloudways Migrator Plugin Can Move Your Site Seamlessly To Cloudways.
- FREE TRIAL - No Credit Card Required.
For beginners, Cloudways offers one of the simplest, easy to use interfaces.
Everything you need for your application (website) is right there at your fingertips - domain management, SSL certificate installation (one click!), CDN integration and much more.
On the server level, the interface is just as simple.
You won't need to use this control panel as much as the application one but here you can backup, restore, scale your services and a whole lot more.
With just 2 clicks you can choose which cloud provider to use as well as the size of your server.
And choose your pricing plan from as little as $10 per month - which is suitable for most sites until traffic really starts to grow.
And their review speak for themselves ....
and more ...
Here's some feedback from Facebook users.
and lastly from Review Signal, who turn normal Twitter conversations into meaningful reviews.
The beauty of Cloudways is that you only pay for the resources you actually use so billing is monthly in arrears. NO CONTRACTS and NO UPFRONT ANNUAL PAYMENTS.
With a free 3 day trial, you literally have nothing to lose.
And if you use my PROMO CODE (WPMM2X20) when signing up, you'll get 20% off your first two months.
I hope that these W3 Total Cache settings have helped you to configure your site for maximum speed.
I have shown the settings that work best for my website. But not all themes and sites are equal.
If there are any W3 Total Cache settings that you have found to be more effective than the ones I have shown, please let me know about them in the comments.
Hope you enjoyed this post.