W3 Total Cache Tutorial Part I: Introduction

DEVELOPMENT

W3 Total Cache Tutorial Part I: Introduction

This tutorial about W3 Total Cache is Part I of a series. This part introduces the WordPress Plugin and explains why website Speed matters.

This tutorial is part of a series relating to W3 Total Cache, the popular WordPress Cache Plugin. In this series, we will take a detailed look at the various W3 Total Cache settings so you can optimize the configuration ensuring maximum performance for your website.

In Part I of the series, we will take a look at the following:

  1. The Benefits of a Fast website

    1. Website Speed as a Ranking Factor

    2. Website Speed Improves User Behavior and Conversions

  2. What is Caching?

    1. Different types of WordPress Caching

    2. Different WordPress Cache Methods

  3. Why use the W3 Total Cache Plugin

    1. Benefits

    2. Features

  4. Next in Part II: Installing W3 Total Cache

Part II will look at how to test your website speed. You can see a list of all parts of the series in the sidebar.

1. The Benefits of a Fast website

fast-website The advantage of having a fast website is to give a good user experience to your visitors. If your website loads faster you can expect users to remain on your website longer, you will get more page views with reduced bounce rate, and most importantly your conversions will increase.

Let us take a look at this in a little more detail:

1. a. Website Speed as a Ranking Factor

While Google has said that website Speed is a Ranking Factor, it is slightly more complex than just "faster websites rank better than slower websites." We suspect there is no direct correlation between website Speed and Ranking (unless your website is very slow), but instead website Speed influences other metrics \ things that may, in turn, affect Ranking.

On the 21st April 2005, John Mueller, webmaster trends analyst at Google commented in a Hangout:

I don't know how much of that [PageSpeed ranking factor] is still used at the moment. So we do say we have a small factor in there for pages that are really slow to load where we take that into account. But I don't know how much that's actually still actually still a problem in ranking.

We suspect website Speed does affect Google Search Ranking due to other reasons. For example, Google recently stated that slow websites are crawled less. This could have an impact on Google picking up changes to your website and delaying any fresh content boost in rankings.

Also, the new Artifical Intelligence part of the Algorithm called "RankBrain" may start to incorporate user metrics such as Bounce Rates, User Engagement (i.e. comments, social media discussions) in its algorithm to improve the search results. We discuss how website speed can improve such user metrics below.

Finally, while we indicated that Page Speed is not necessarily a Ranking Factor in its own right (although RankBrain may change that), the benefit of great user experience could directly lead to more webmasters linking to your content. With backlinks being an important ranking factor, you can see how indirectly a faster website and good user experience can help with Google Rankings.

1. b. Website Speed Improves User Behavior & Conversions

How Loading Time Affects page abandonment Various studies show reduced page load time causes increased visitor time on a website, reduced bounce rate (i.e. more page views) and increased conversions (i.e. more sales, clicks on adverts, or some other user action). The graph to the right shows clearly how page load time affects page abandonment over time, and abandonment starts after just a second or two.

Here are some more interesting statistics:

  • Bounce Rate: A website that loads in more than 5 seconds has double the bounce rate than a website that loads in just 1 second.
  • Conversion Rate: A 1-second increase in page loading time can decrease your conversion rate by up to 7 percent.
  • Shopping Cart Abandonment Rate: 20 percent of users abandon their cart because of slow website loading time. 67 percent of online shoppers revealed that they abandoned a purchase due to slow loading times.
  • Shopping Cart: If you halve your loading time, you may see your shopping cart completion increase by 11 percent.
  • Advertising Revenues: Bing discovered that an extra 2 seconds in search result load times caused a 4.3 percent decrease in revenues.
  • Less Activity: Google confirmed that just a 400ms delay in the search results loading, results in a 0.44 percent drop in search volume.

As you can see, the statistics speak for themselves.

2. What is Caching?

In simple terms, caching (pronounced "Cashing) is the process of storing data in a cache in a temporary storage area so it can be served quicker during its future use.

To put this in perspective, we need to look at an example. Just imagine that when you load a webpage the server needs to get the results of 250 separate queries just to form that one page. The task of looking up the data may take 4 seconds. Now imagine that you have 50 visitors on your website, and for every page they visit 250 queries are sent to the server. When on Shared Web Hosting, which has limited resources, you can imagine that this can put stress on your resource allowance, as well as affecting the load time of your website.

If on the other hand, you implement caching then only the first visitor causes those 250 queries to hit the server. After the first visit, the results of those queries are stored in cache, and then subsequent visits to that page can be served from the cache. As the page is pre-compiled, the number of queries is significantly reduced thus significantly reducing the load on the server. Also, because the user does not have to wait for the 250 queries to compile, the webpage is returned much faster.

Usually, when implementing caching, a time limit is placed on cached items to ensure that any modifications to your content become visible, rather than serving old out of date cached versions.

Let us take a brief look at some of the concepts involved:

2. a. Different Types of WordPress Caching

We will look at the various types of caching in more detail later in the Tutorial Series, but for now, it is useful to understand the basic concepts:

  • Page Cache — If you use a CMS, such as WordPress, whenever a page is viewed the server has first to query the database and run scripts to understand what form it should take. Page Caching stores a copy of the finished page so it can be retrieved without having first to do all this work for subsequent loads.
  • Database Cache — This stores the results of any database queries, making the retrieval of subsequent duplicate queries faster.
  • Fragment Cache — A page can be made up of various parts (i.e. Main content, Sidebar, Footer, etc.). Fragment Cache works like Page Cache but can store and retrieve each section separately.
  • Object Cache — This stores any calculations made by the WordPress API into the cache.
  • Browser Cache — This places a copy of the webpage in the Users Browser Cache. When that user re-visits the same page using the same browser, it will be loaded from the cache stored on their computer rather than querying the web server.

2. b. Different WordPress Cache Methods

There are several different methods used to store the cached data. The method and hardware used for the storage of cached data can affect how quickly the data can be retrieved from Cache. A brief summary of the different methods are below, but we will cover each in more detail later in the Tutorial Series.

  • Disk Caching — This is where either PHP Script or. htaccess file is used to direct users to a cached version of the page located on a Hard Disk. The disk could utilize traditional Hard Disk Drives or the faster SSDs.
  • Memory Caching — Memory is much faster than Disk Caching, but also much more complicated \ expensive to implement. There are various methods to implement Memory Caching, such (but not limited to) as XCache, PHP OpCache, and Memcache.

3. Why use the W3 Total Cache Plugin

According to W3 Edge, the makers of W3 Total Cache, it is the " only WordPress Performance Optimization (WPO) framework; designed to improve user experience and page speed ". It does increase user experience by utilizing Caching to increase server performance, reducing page load times as well as providing Content Delivery Network (CDN) integrations.

W3 Total Cache is recommended by countless web hosting providers including Page.ly, DreamHost, MediaTemple, GoDaddy, Hostgator and many more. It is used by over a million websites, including mattcutts.com, mashable.com, webdesignerdepot.com and of course, this one.

3. a. Benefits

  • We have covered the benefits of having a fast website at the start of this post, namely better search ranking, increased visitor time on website, lower bounce rate, and more conversions.
  • Improvements in overall website performance. Obtain significant Google Page Speed improvements, and page load times when configured.
  • Extremely fast subsequent page views for visitors with browser caching.
  • Optimized rendering times (i.e. the time when the page starts to form in the browser)
  • Reduced load time causes increased visitor time on website and reduced bounce rate (i.e. more views)
  • Improved web server performance enables your server to handle higher traffic \ views
  • Save bandwidth using minification and HTTP compression

3. b. Features

A list of features can be found on the Plugin website. A summary of the features are as follows:

  • Compatible with shared hosting, virtual private Servers, cloud hosting, dedicated servers, and dedicated server clusters.
  • Content delivery network (CDN) configuration for Media, Theme files, and Core WordPress files
  • Mobile website support. Switch caching of pages by referrer or user agents, including "theme switching".
  • Caching of (minified and compressed) pages and posts in memory or on disk or CDN (mirror only)
  • Caching of (minified and compressed) CSS and JavaScript in memory, on disk or CDN
  • Caching of feeds (website, categories, tags, comments, search results) in memory or on disk or on CDN (mirror only)
  • Caching of search results pages (i.e. URIs with query string variables) in memory or on disk
  • Caching of database objects in memory or on disk
  • Caching of objects in memory or on disk
  • Minification of posts and pages and feeds
  • Minification of inline, embedded or 3rd party JavaScript (with automated updates)
  • Minification of inline, embedded or 3rd party CSS (with automated updates)
  • Browser caching using cache-control, future expire headers and entity tags (ETag) with "cache-busting."
  • JavaScript grouping by template (home page, post page, etc.) with embed location control
  • Non-blocking JavaScript embedding
  • Import post attachments directly into the Media Library (and CDN)
  • Support for WP-CLI with commands for cache purging, query string updating and more

There is a lot to take in, and you may not understand all of the features above. Don't worry, though; we will be covering all these features throughout the Tutorial Series.

4. Next in Part II: How to Test Your Page Speed

In the next part, we will show you how to check the page speed of your website. This will provide a useful benchmark so you can compare your website speed before, and after installing and configuring W3 Total Cache.

Click here for Part II.

Related tags
Check out our top user-rated host: SiteGround
Need help choosing a hosting provider?
Check out our top user-rated host: SiteGround