How to Setup WordPress Caching with W3 Total Cache (W3TC)

By WP Saviour •  Updated: 03/04/21 •  9 min read

The world’s two hottest WordPress caching plugins are WP Great Cache and W3 Entire Cache (W3TC). Developed by Mashable’s CTO, W3 Entire Cache is by far in all probability probably the most versatile WordPress caching plugin accessible, utilized in extreme guests web sites like Smashing Journal, Mashable, MakeUseOf and Yoast. This tutorial is a beginner’s info to configuring W3 Entire Cache. Phrase of advice: W3TC has a plethora of superior settings a number of of which I’ve a troublesome time comprehending. In the event you occur to’re unfamiliar with a setting it’s biggest to not mess with it. Let’s begin!

Arrange W3 Entire Cache


To place within the W3 Entire Cache plugin, open your WordPress dashboard, adopted by Plugins > Add New. Look for “w3 entire cache” and arrange the first finish consequence. You might also manually acquire the plugin and add it to the wp_content/plugins folder by way of FTP. You in all probability have beforehand put in a single different caching plugin like WP Great Cache, you should disable it sooner than activating W3 Entire Cache. This will cease the two plugins from conflicting. As a rule of thumb, don’t maintain a few WordPress caching plugin activated at any given time.

Configuring W3 Entire Cache – Primary Settings

W3 Entire Cache creates a model new menu entry known as Effectivity in WordPress dashboard. The alternatives that we’re searching for are beneath Effectivity > Primary. You’ll uncover that this net web page has an incredible number of settings for a caching plugin (and a whole lot further if you’re into superior stuff). Each setting is positioned inside a discipline – known as modules. I’ve talked about each of these modules with associated screenshots. In the event you occur to get caught or are not sure a number of express setting, merely adjust to the screenshots.


The first module you’ll uncover is Primary. I’d counsel to not permit the all the caching selections using the toggle checkbox. You might activate settings that aren’t required (and even supported by) your host – which could inadvertently decelerate your website. Nonetheless, in case you want to quickly disable all the modules, this toggle checkbox seems to be helpful! Sooner than we proceed extra, if you’re unfamiliar with the phrases ‘net web page cache’ or ‘database cache’, I would counsel learning How WordPress Caching Works.

Net web page Cache Module


The second module we’re going to configure is Net web page Cache. The Net web page cache method is set by your web internet hosting setting. In the event you occur to’re using a shared host, Disk: Enhanced is your best option. Nonetheless, if you’re using a loyal or digital server and you have got APC (or one other kind of Opcode caching put in), you should select the respective alternative.

Minify Module


The Minify module compresses the CSS and JavaScript recordsdata your theme makes use of, by eradicating pointless strains of code like suggestions and whitespaces. This reduces the filesize by ~10% which leads to a sooner web site. Beneath Minify cache method you should select the acceptable alternative based totally in your server.

Completely different Caching Modules


The next two modules are Database Cache and Object Cache. Enable each of them and alter their caching method to the one biggest match to your web internet hosting setting – an identical to you in all probability did beneath Net web page Cache and Minify.


The ultimate module that we want to permit is Browser Cache. If you’ve enabled them, click on on on Save all Settings. That must do it! W3 Entire Cache is now enabled in your server. We’re going to now take an in-depth look into two specific modules – Net web page Cache and Browser Cache. The rest of the modules’ default values are merely fantastic.

Net web page Cache Settings


The Net web page Cache settings may very well be found beneath Effectivity > Net web page Cache. The settings listed below are fairly self explanatory. I’ve enabled a number of them – particularly Don’t cache pages for the subsequent shopper roles. This ensures that when an creator is modifying a submit, he/she’s going to able to view the newest mannequin and by no means the one from the cache.

Preloading the Cache


By default, W3 Entire Cache caches an internet web page when it is first requested. You even have the selection to pre-generate copies of all the posts/pages. This way, irrespective of when a buyer requests an internet web page, the cache is ready and the online web page is served inside the lowest doable time.

It is best to configure the cache preload settings based totally in your web internet hosting setting and the amount of holiday makers your website receives.

Browser Cache Settings


That’s found beneath Effectivity > Browser. The idea is to leverage your buyer’s machine. Enabling Browser cache would make the static recordsdata (just like CSS, JavaScript and footage) to be served out of your buyer’s browser cache. In truth, there’s an expiry time which could cease the utilization of outdated info. This removes an unlimited load from the server, saves bandwidth and considerably improves your web site’s complete effectivity.

It’s Alive!

How are you conscious that W3 Entire Cache is unquestionably working? Successfully, the plugin net web page says so. You may additionally view the provision code of your web site uncover one factor like this:


W3 Entire Cache Effectivity Benchmark


I waited spherical 1 hour after I enabled caching and benchmarked the website’s effectivity using GTmetrix. That’s with none caching plugin:


That’s one hour after W3 Entire Cache was configured:


Uncover the excellence? A 3% and 5% improve in Net web page Velocity and YSlow Grade. Neat, correct? Now take into consideration a thousand of us visiting your web site day by day – take into consideration the amount of CPU cycles (fancy time interval for helpful useful resource utilization) you’ll save. Caching not solely reduces you net web page dimension, however it moreover improves the final web site’s effectivity which paves one of the simplest ways to an unbelievable shopper experience.

Troubleshooting W3 Entire Cache


You might uncover that your web site’s load time has elevated after placing in W3 Entire Cache. Is that even doable? In truth it is! In actuality, this is usually a fairly frequent beginner’s mistake. There may very well be various causes behind this:

In the event you occur to’re nonetheless going by way of points and likewise you’ve tried the default/advisable values, I wish to suggest switching to WP Great Cache.

.htaccess File Permission Error

Relying in your web internet hosting setting, you might see an error message stating that your .htaccess file isn’t writable. Which suggests the webserver and/or PHP handler would not have the permission required to change the .htaccess file. There are two choices:

I’ve to degree out that the second method is safer and is taken into consideration a superb security apply.

Conclusion – Which Plugin Must I Use?


You is prone to be questioning which WordPress caching plugin to utilize. Finally, I did write two separate tutorials to realize the an identical goal. Should you go for WP Great Cache or W3 Entire Cache? Successfully, to make a protracted story fast – if you’re on a shared server and don’t want the difficulty of A/B testing and/or troubleshooting, WP Great Cache is way easier to implement. Nonetheless, if you’re using a digital or devoted server with Opcode caching (like APC or XCache) put in – and wouldn’t ideas some additional work, then W3 Entire Cache is for you. When configured accurately with superior methods, W3TC’s outcomes are far superior.

This concludes establishing our caching plugins. I’ll moreover speak about how one can setup a CDN with each of these plugins. Throughout the meantime, you presumably can check out plenty of the best free CDNs for WordPress and preserve tuned.

Parting question: What’s your favourite caching plugin? How loads distinction did it make in your web site’s effectivity? We’d like to hearken to from you!

WP Saviour

I am a WordPress specialist. My mission is to help you create beautiful websites with ease!