In our last article we gave you an introduction to caching is and how it could benefit your WordPress site. In this follow up article, we’ll show you how to optimize and speed up your WordPress site in just a few clicks using the W3 Total Cache plugin.

The W3 Total Cache plugin, or W3TC, is a powerful caching plugin used by top sites like Mashable, Smashing Magazine and MakeUseOf.com. W3TC can help your site pages load quicker, help withstand traffic spikes and provides loads more features. Best of all, W3TC is free.

To measure the performance increase when using W3TC, let’s start by performing a Page Speed Test at https://developers.google.com/pagespeed/. Here are the results of The ClickStarter before we activated W3TC.

Before Caching – 71/100

Let’s see if we can do better with W3TC.

W3 Total Cache Guide

1. Install the Plugin

The first step to using W3TC is installing the plugin. You can install W3TC directly from your WordPress admin area or by manually uploading the plugin to your wp-content/plugins directory.

Once installed, remember to Activate the plugin. Now go to the Performance » General Settings page in your WordPress admin.

The first time that you activate W3TC, you’ll see a note at the top of the page saying that Preview mode is active. You may also see a notice telling you to change your directory permissions back to 755 after installing the plugin.

We’ll deal with this later. Now, it’s time to tackle the settings.

2. Configure Settings

This is the most daunting step of setting up and using W3TC because of the many, many options and advanced settings. It’s not possible to cover all of W3TC’s settings in detail but this article will guide you through the general settings page and get you set up.

W3TC provides multiple ways to cache your WordPress site. The General Settings page allows you to turn the available caching methods on or off with the default configuration.

Here is our recommended settings for websites on shared hosting:

Page Cache – Enabled with Disk:Enhanced or Disk:Basic method

Minify – Disabled

Database Cache – Enabled with Disk method

Object Cache – Enabled with Disk method

Browser Cache – Enabled

CDN – Disabled, unless you use a CDN service

Varnish – Disabled, only applicable for really large sites

CloudFlare – Enabled if you have already setup your site to work with CloudFlare. Otherwise, leave it Disabled.

If your site is hosted on a virtual private server (VPS) or better, you’ll have the option of enabling the above caching methods with Opcode or Memcache. The exact configuration will depend on your setup, so consult your server administrator.

We recommend disabling Minify because it has a high possibility causing bugs with your themes and plugins. You should only enable Minify if you have a web developer helping you sort through the bugs.

3. Disable Preview Mode

Now that you’ve configured all the settings, it’s time to enable caching on your site. At the top of the W3TC General Settings page, locate the General box and click the blue Disable button to disable Preview mode. Congratulations, caching is now enabled on your site.

If W3TC gave you a notice about your wp-content directory being writable, you should change it’s permissions back to 755 now.

4. Empty the Cache as Needed

W3TC refreshes your website’s cached pages periodically, but ocassionally you’ll want to update the cache immediately e.g. after you update a post or install / deactivate plugins or themes. You can update the cache easily by clicking the Empty All Caches link from the Admin toolbar or from the W3TC settings pages.

Keep Optimizing

Let’s have a look at the results of our caching by running the Page Speed Test again.

After caching – 75/100

The ClickStarter managed to gain 4 speed points after implementing caching. It’s not a fantastic increase, but it’s a good result for 5 minutes work.

W3TC is a quick and easy way to get started with caching, but if you want better results you’ll have to work for it. To improve your page speed further, here are some other things to do on your site.

  1. Reduce the number of images on your site, or combine them into a single image. See how YouTube and Facebook make use of this technique.
  2. Reduce the number of active plugins. Many plugins load additional CSS and JavaScript files which add on to the page load time.
  3. Install the Lazy Load plugin. This plugin delays images from loading on your website until visitors scroll down far enough to see them.
  4. Use advanced embed code for social widgets. While more difficult to implement, the advanced embed code usually has cool features like deferred loading which reduces page load speed.
  5. Upgrade to a more expensive server (approximately $50/mo) to enable better caching methods in W3TC. We recommend Site5 VPS if you are serious about upgrading.

WordPress optimization is a big and complex topic. We hope that you now have a better idea of what caching is and how to implement it. Do keep in mind that installing a caching plugin alone can only do so much. If you have further questions about caching, please leave a comment or get in touch.

About David

David has over 15 years of experience with web geekery and WordPress. That experience spans every­thing from cre­at­ing affordable websites for small businesses, developing custom themes to opti­miz­ing WordPress sites for thou­sands of page views in a day. Say hi to David on Twitter at @blogjunkie.

Reader Interactions

Comments