W3 Total Cache is one of the leading caching plugins available for WordPress, along with WP Super Cache, with both receiving downloads in the millions. These plugins enable you to speed up the time it takes for your site to load, reducing the time visitors have to wait for your content to be displayed.
In basic terms, they deliver this speed improvement by reducing the amount of load that is put on your server and database. This is done by creating local copies of your files on the visitor’s computer, as well as reducing the amount of times your database is accessed, and also lowering the number of times each page is generated.
While this might sound quite technical, these plugins make light work of enabling this. However, they do have a considerable amount of settings to work through, some of which have the potential to cause problems for your site if configured incorrectly.
If you want the benefits of a faster site, such as increased visitor retention and improved ranking in the search engines, without paying for an expensive managed hosting service, then a free caching plugin such as W3 Total Cache is the answer. Even if you do use such an hosting service, a caching plugin could still help.
To ensure you get the most from this plugin, we’ve created the following guide to setting up W3 Total Cache on your WordPress site. And guess what? We have an additional bonus for you – a short review and detailed guide on how to setup MaxCDN in WordPress using the W3 Total Cache plugin. The terms W3 Total Cache and W3TC have been used syonymously in this tutorial.
W3 Total Cache Installation
As this is a free plugin, it can be installed directly from your site. From the admin dashboard of your WordPress site, simply go to Plugins > Add New and then search for ‘W3 Total Cache’ and it should be the first plugin in the search results.
Hit ‘Install Now’ and then activate the plugin once it’s installed. Once the plugin is live on your site, the settings can be accessed from the ‘Performance’ menu item on the left-hand sidebar menu.
Setting up W3 Total Cache
As this is a pretty advanced plugin that can provide a real benefit to your site in the form of faster loading times and improved site speed, it’s understandable that the settings for W3 Total Cache are quite complex. However, to ensure you get the most from this plugin, we’ve broken down the setup process for this plugin to make the task less daunting.
This is the second menu item under the Dashboard link and is the main page we are interesting when configuring W3 Total Cache.
The first option allows you to quickly enable or disable all the caching options, but instead of doing that, we will take a look at each of the options individually to give you a better understanding of what they do.
WordPress is a dynamic platform and each time your site is visited by a user, the pages are generated dynamically. This means that the PHP scripts run, the database is queried, and then the page is generated. This happens each time someone visits your site and for each further page or post that is visited. This is good as a fresh and up to date version of your content is displayed on each visit. However, it is resource intensive with so much taking place on each page load.
By enabling page caching at this point, you can instruct the plugin to create static versions of your pages. This reduces the workload involved in displaying your site to your visitors, enabling the site to load faster. The downside is that any changes made to the site won’t be immediately visible to your visitors.
The options for this setting allow you to set the best method of page caching, matched to your web hosting. The recommended option is Shared Server: Disk Enhanced for those using shared hosting. If you are using a different type of web hosting, select the appropriate option.
In the future, if you have make any changes to your site and want them to be immediately visible to your visitors, then clicking the ‘Empty cache’ button located here will clear the cached versions and recreate them using the new content of your site. However, the plugin does this at regular intervals to balance the need to display up to date content and reduce load on the servers.
This option doesn’t work on all hosting servers so configuring these options may not provide any results. In some cases your web host may even recommend you do not enable this setting so it’s worth checking with them first. If you are unsure, leave this setting.
However, if you have no reason not to enable this, the potential results can be noticeable. Here are the recommended settings for these options:
- Enable: check
- Mode: Auto
- Cache method: Disk
- HTML minifier: default
- JS minifier: default
- CSS minifier: default
What you are doing here is instructing W3 Total Cache to remove unnecessary data from the HTML, CSS and JS files that make up your site. This reduces their size and therefore the time it takes for them to load.
Again, the effectiveness and suitability of this can depend on the server your site is hosted on and your choice of web host. Check with your host for guidance on enabling database caching, and follow their recommendations. If there is no warning not to use this, it can be worth enabling. To do so, enable database caching and select Disk from the dropdown menu.
This option allows the browser used by the visitors to your site to store a copy of files of your site in their temporary folder. These files can then be loaded again from that local folder on a return visit. This saves the visitor’s browser from re-downloading all those files again. The types of files stored include HTML files, images files and other static files. This doesn’t affect new posts that are published to your site, and these will be visible to visitors once they go live.
While browser caching speeds up site load times, it does mean changes you make to your site, such as changing a font or a logo, won’t be immediately visible to your visitors. However, as the cache is refreshed at regular intervals, the changes will become visible to the users once this happens. For best results, enable browsing caching.
A CDN service will store your static files in data centers around the world, and then serve those files from the location nearest to your visitors in order to reduce page load times. There are many free & premium CDN services, most notably CloudFare and MaxCDN. WPKube is using MaxCDN (our review).
The first thing is you need to setup all the required parameters as shown in the tutorial so far. Next, you’ll need to signup for a MaxCDN account, which retails for around $9 USD/mo. Once you have the account ready, sign into it and keep it open in a separate tab.
Create a new Pull Zone in MaxCDN
First, we configure the things required from MaxCDN’s site. These are the things we’ll be doing:
- Create a new Pull Zone
- Configure it’s settings
- Link it to your W3TC plugin
Follow these steps to create a new Pull Zone:
- Login to you MaxCDN Control Panel and select Zones icon.
- Under Zones, you’ll find a secondary menu right below it. Select Pull Zones.
- This will bring you to the Pull Zones Overview page.
- Press the Create Pull Zone button.
Configuring the new Pull Zone:
This is an important phase of the tutorial and must be done with utmost care. I’m telling you this, becauseI made a mistake in this very step – which led to broken images and CSS files all over my site. They weren’t loading from MaxCDN’s servers. Thankfully, I realized the small error I had made, and things were running from the next minute.
- Pull Zone Name: Give it a name you could easily recognize and categorize. Stick to alphanumeric characters since special symbols (including space) isn’t allowed.
- Origin Server URL: This field must contain the base URL of your site. For example, even if WordPress is installed under http://www.mycompany.com/blog/ just enter http://www.mycompany.com as the base URL. Don’t add the trailing ‘/’. If your site does not have www in its base URL, omit that part. The www/non www part is probably configured under Google Webmaster Dashboard. In this tutorial, I’m using a sub-domain and WordPress is installed under http://server12.hostwhitelabel.com/wpkube. Note that I’ve entered http://server12.hostwhitelabel.com as my base URL.
- Label: This can be any text you want – whatever helps you categorize this Pull Zone. You’re free to use special characters here! 😉
Once you’ve entered the data, press Create. You’ll have to wait for around 5-10 seconds for the pull zone to get created.
A new Pull Zone should be created in a few minutes and you’ll get a message as such:
To review the information on your newly created Pull Zone, head over to MaxCDN Control Panel > Overview > Zone Configuration.
Take note of the CDN URL and the Zone Name, as we’ll need it in the next part of this tutorial.
Linking MaxCDN to W3 Total Cache in WordPress
In our lifelong effort to keeping things simple, we’ve further divided this phase of the two parts. The first two parts past authorizes your MaxCDN account with WordPress and the final one validates the authenticity.
Part One: The Connection
- First, we need to go to the CDN menu under W3TC’s settings. From your WordPress dashboard go to Performance > CDN > CDN Settings.
- Select MaxCDN as your CDN provider and click the Authorize button.
- Next, you’ll be redirected to MaxCDN’s control panel where a new authorization key is generated.
Part Two: The Validation
- Copy-paste the authorization key in Authorization key field in W3TC’s CDN Settings menu.
- Click on the Validate button to check if the key is valid.
Part Three: The Home Run
- Once you’ve successfully linked the authorization key, head over to the Select Pull Zone field. From the drop-down menu, select the Pull Zone Name which you created in the last step. In our case it is screamingshoes.
- If you can’t find the name, double-check everything up to this point. If you still get stuck, contact customer support.
- Leave SSL Support as it is, i.e. auto determine
- Under the Replace site’s hostname with field, copy-paste the CDN URL obtained from the Overview page in the MaxCDN Control Panel.
- Here comes the moment of truth – click on Test MaxCDN to see if the connection was successful.
- If you’ve followed the instructions to the letter, then you should see a green status box indicating that MaxCDN was successfully linked to your account.
- Finally, click on Save All Settings and start enjoying your supercharged website.
You can also conduct various speed tests to evaluate your website’s performance before an after using a CDN. We are sure that you’ll notice a significant difference in performance.
Does W3 Total Cache Really Makes Your Site Load Faster?
Even by enabling just a few of the features of W3 Total Cache or similar WordPress caching plugins, you should be able to speed up the load times of your site. The more content your site has, the greater the benefit will be. This is worth bearing in mind if you test this plugin with a service like Pingdom and don’t see much difference after enabling the plugin on a new site. As your site grows, the benefits of caching will increase.
But once you install a CDN, the benefits are visible almost instantaneously. What loaded in 9.26 seconds could reduce to 1.59 – a 7.67 second speed-up is monumental in Internet land!
As always, we’d love to hear from you. So here’s our question to you – What site speed improvements and load time reductions have you seen from enabling this plugin?