WPKube

How to Install and Setup W3 Total Cache Plugin and MaxCDN

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.

General Settings

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.

Page Cache

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.

Minify

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:

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.

Database Cache

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.

Browser Cache

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.

CDN

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).

This section is optional for people who are starting a new blog or site or are planning to use a CDN solution. If you do decide to use MaxCDN, use our coupon code “wpkube” to get 25% off.

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:

  1. Create a new Pull Zone
  2. Configure it’s settings
  3. Link it to your W3TC plugin

Follow these steps to create a new Pull Zone:

  1. Login to you MaxCDN Control Panel and select Zones icon.
  2. Under Zones, you’ll find a secondary menu right below it. Select Pull Zones.
  3. This will bring you to the Pull Zones Overview page.
  4. 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.

  1. 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.
  2. 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.
  3. 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

Part Two: The Validation

 

Part Three: The Home Run

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!

The “Before and After” Effect of using W3TC + a CDN

So, only if you really like what you see, go ahead and register for a MaxCDN account. And while you’re at it, make sure to use our coupon code wpkube25 for an additional 25% discount!

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?