Internet Wordpress & Web Development

How to Boost Your Website’s Performance With W3 Total Cache and a CDN

Ryan Dube 03-01-2014

If I pause for three entire minutes before responding to any question you ask me, how long do you think it’ll take before you get sick of our conversation? That’s exactly how you should look at the speed of your website. This article will help you boost your site speed and avoid forcing your visitors to wait.


There are many reasons why speed matters so much. One is obviously user experience. You’ve probably experienced it yourself – doing some Google query, visiting a site that promises an answer, and then sitting there waiting for over several excruciating  minutes for the poorly optimized page to load.

However, it goes beyond mere user experience. Google judges the quality of your site based on your page load time. Getting judged by Google as a low-quality site because your pages load slowly will end up hurting your site quite a bit in the long run: you will be listed lower in the search listings, and fewer people will visit your website.

So, taking some time to perform proper maintenance and optimize your website will have tremendous payoffs over the long term. In this article, I’m going to outline how you can tweak the settings of W3 Total Cache for WordPress to speed up your website. James described the basic setup of W3 Total Cache How To Configure The Various W3 Total Cache Plugin Settings For Your Wordpress Blog A while ago I talked about the benefits of installing the W3TC plugin on your Wordpress blog in order to speed it up with various caching, but some readers were understandably a little wary about... Read More a few years ago, but in this article I plan to go into much more detail, including setting up a Content Delivery Network that’ll further boost your site speed and enhance user experience.

Optimizing W3 Total Cache for WordPress

While tweaking the settings in your WP Admin panel and your web hosting control panel, it’s always a good idea to take a backup of your site first. There are many ways to accomplish this, either using plugins like UpdraftPlus, which Kev recently reviewed How To Backup & Restore Your WordPress Site Easily With UpdraftPlus Read More , or the WordPress Backup plugin, which I’ve reviewed How to Do an Automated Remote Backup of Your Wordpress Blog This weekend, my website got hacked for the first time ever. I figured it was an event that was bound to happen eventually, but I still felt a bit shocked. I was lucky that I... Read More . If you don’t want to use plugins, just use the SSH command line How to Back Up Your Website Through SSH Command Line Need to back up your website in a pinch? Forget plugins! Here's how to back up a website using SSH on GoDaddy and other webhosts. Read More approach, or you can use a web server app like MySQLDumper How To Regularly Back Up Your Large MySQL Database with MySQLDumper As I watch my own Wordpress blog grow in both posts and user comments, I'm starting to eye my growing database with a wary eye. What happens if the server goes down, gets hacked or... Read More to do the job.

Once that’s done, it’s time to do a quick benchmark speed test for your site.  Dave LeClair recently reviewed PageSpeed Insights, which remains the tool most webmasters turn to first to check their site performance. In my case, PageSpeed showed me that I have a lot of work to do to improve my site performance.



It’s always good to get a couple of independent benchmarks done, so I also turned to Pingdom to run a speed test on my blog.  Again, performance was pretty horrid.

site-cache2 Pingdom reported back that my site is slower than 72% of all other websites that have been tested at Pingdom. That’s pretty sad!

I had installed W3 Total Cache years ago and set it up with the basic settings as James described in his post (mentioned above), but I never actually took the time to go through and learn the plugin and how to optimize it.


Ideal W3 Total Cache Settings

As James mentioned, you should always at least enable Page Cache, the top setting on the W3 Total Cache settings page, and select “Disk (enhanced)” from the Page Cache Method. This setting will create static cached pages for every page on your site that gets loaded on the reader’s end, so the next time they visit the page it will not be dynamically loaded every time.
This one change alone can dramatically improve the performance of your site.  The second is the Browser Cache setting, which you’ll see further down the settings page.  What does this setting do? Essentially, it tells the browser to download images, CSS, JavaScript, and any other static files on the page into a temporary folder so that subsequent pages will use those same static files from the browser cache rather than re-downloading them from your website every time. To enable this, click “Enable” in the Browser Cache section.

Then, click “Browser Cache” under the W3 Total Cache “Performance” section on the Admin panel. I typically enable everything except for caching 404 errors. The important thing is to ensure the first three items are enabled as defaults.

With W3 Total Cache configured, it’s time to do another benchmark to see how things have improved.

Benchmark After W3 Total Cache Set Up

Running PageSpeed Insights, I discovered that the score for both Mobile and Desktop increased 10 points, and Desktop rose out of the read zone.
Pingdom revealed the biggest increase.  Performance went from 72% slower than most other sites, up to 52% faster than most other sites!


This is a tremendous improvement, thanks to W3 Total Cache, but there are some more things you can do to optimize the performance of your website.

Your Web Server Should Compress Content

An article by Google engineers at Google Developers describes just how important compressing web content is in order to conserve Internet bandwidth. In fact, their article starts out with the dramatic statement, “Every day, more than 99 human years are wasted because of uncompressed content.”

If you don’t want to contribute to wasting your readers’ time, then you may want to explore your web hosting account for any tool marked as “Optimize Website” in the CPanel.  In here, you will find that it defaults to “Disabled”. Go ahead and change that to “Compress all content” and click “Update Settings”.

This will require a slightly higher load on the web server CPU, but the trade off in saved bandwidth is well worth it. Just keep a close eye on your server (or notify your host what you’re doing) just to be sure the CPU load increase isn’t too significant.


Running another bookmark test, I notice that this change has increased my performance by another 5%.

Of course, there’s still more you can do. Specifically, you can sign up for a Content Delivery Network (CDN) service.

Why Using a CDN Boosts Performance

A Content Delivery Network is a service that has servers located all over the world. When you sign up for a CDN service, the static content like images, CSS files, and JavaScript all gets cached on multiple web servers around the world. When a user visits your website, the CDN service redirects visitors to the web server located closest to their geographic location.

This means if you have a web hosting account with headquarters and a data center in Houston, Texas, a reader from Australia will not have to wait for a connection to load between their browser and the web server in Texas; a CDN server 3 Ways To Speed Your Site Up With The Cloud The Cloud is the answer to all the worlds problems, it would seem - a buzzword technology that sends computing full circle right back to where it started - with a thin client model and... Read More will provide them with the content in a fraction of the time.

W3 Total Cache lets you set up a CDN on the main settings page under the Content Delivery Network section.


In my case, I’ve signed up for a MaxCDN account. These aren’t free accounts, but they are fairly affordable. For a website width monthly bandwidth of around 500 GB per month, you’re looking at around $40 per month, and upgrading to a 1 TB business account is only around $80 per month. You’ll need to set up a “Pull Zone” in your CDN account.

If the option is there, always enable Compression to cut down on bandwidth use.


Once your Pull Zone is in place, the service will give you the CDN URL you’ll need to set up CDN in W3 Total Cache.

Using the CDN URL from your CDN account, go back to WP-Admin on WordPress and go to the CDN Configuration menu. Type in the URL into the field for “Replace site’s hostname with:”


If you’re using the newest version of W3 Total Cache, this section may look a little different. You’ll find an “Authorize” button that you can use to directly get an API key.  You also have the ability to add multiple sub-domains from your site that will queue using the single CDN URL, but you’ll need to add the CNAME and then add those in your own domain hosting account — but that’s beyond the scope of this article. The above is a simple setup for a blog without sub-domains.

Don’t brush this off if you care about SEO!  While adding a CNAME in CDN settings and under your domain hosting account isn’t required to use a CDN, you’ll want to take advantage of it so that the hosted image files show up under your existing domain name rather than some other CDN domain. Failing to do this properly could significantly drop your indexed pages and search engine impressions, so tread carefully!

Save all settings, clear your cache. If it’s set up correctly, you’ll see that the CDN is enabled.



Once this is enabled properly, go ahead and run another performance test. This time around there was a pretty nice increase – a 7% bump in speed again, thanks to CDN caching.

This performance increase may actually be even more significant for people who live further away from your hosting company’s data center. Since I’m in the U.S., I saw a 7% performance boost, but someone in Europe or Asia may see a double-digit performance increase when visiting your site now. There’s no better way to serve your international audience better than this.

One last but very important thing to keep in mind when you’re using a CDN service like this is that many of your content – particularly your image files – will be served up from a different domain. The last thing that you want is for Googlebot to crawl that other domain, identify it as duplicate content of your original site, and then drop your ranking authority based on that false information. To avoid this, you need to disallow robots from crawling the CDN version of your pages and files. CDN services will offer an SEO area where you can enable this, such as MaxCDN which has this under SEO Settings where Robots.txt can be enabled and the Disallow robots.txt entry configured.


As you can see, there are a lot of ways to beef up the performance of your website. W3 Total Cache or other WordPress caching plugins will certainly help you do that, but don’t think it’ll do everything for you. In addition to installing a caching plugin, you’ll want to make sure you’re compressing files on your web server; you’re making use of a CDN; and you’re exploring suggestions offered by the Google Pagespeeed tool to constantly improve your site. It’s a job that never really ends, but it’s well worth the effort.

Related topics: Blogging, CDN, Web Design, Web Development, Webmaster Tools, Wordpress Plugins.

Affiliate Disclosure: By buying the products we recommend, you help keep the site alive. Read more.

Whatsapp Pinterest

Leave a Reply

Your email address will not be published. Required fields are marked *

  1. Olajide
    December 10, 2014 at 7:20 pm

    I use Cloudfare, I activated from the cPanel. Do I still need to configure CDN?

  2. Oleg
    January 4, 2014 at 10:59 am

    Simply removing at least a part of those 3rd-party scripts from makeuseof would enormously speed it up and show your visitors you care about them:

    Aggregate Knowledge
    Burst Media
    Casale Media
    Crazy Egg
    Facebook Connect
    Facebook Exchange (FBX)
    Facebook Social Plugins
    GDN Notice
    Google +1
    Google Adsense
    Google Analytics
    Google Custom Search Engine
    Improve Digital
    Neustar AdAdvisor
    New Relic
    Right Media
    ScoreCard Research Beacon
    Twitter Advertising
    Twitter Badge
    Twitter Button

  3. Akshay O
    January 4, 2014 at 9:05 am

    It is a great article. But I don't want to spend money on a CDN service. Could you tell me which is the best and most reliable free CDN (as good as paid one)?

    • Shaswat Saxena
      January 10, 2014 at 3:26 am

      You should go with CLOUDFARE
      It's the best free CDN