↑ Return to CDN

C10 The Ideal W3 Total Cache Settings (With Screenshots)

Page no: C10

Page no: C10

Reference: www.onlinemediamasters.com



If you’re using the W3 Total Cache plugin to make your WordPress site load faster, you made a good choice.

W3TC comes pre-configured with some of the best settings, but not all. I’ll be going through the different performance tabs that appear on the left of your dashboard once W3TC is installed. For best results I would setup both CloudFlare (free) and MaxCDN ($6.75/month) which integrate with W3TC – I’ll show you how to set these up. If you’re ambitious you can buy W3 Total Cache Pro ($99/year) but for most people W3 + CloudFlare + MaxCDN is fine.

Some of these W3 Total Cache settings are taken from the “Install” tab where you can find tips by Frederick Townes, the developer. Other settings come from my own experience optimizing WordPress sites and independent research. Don’t forget to test results in a tool like GTmetrix as you make tweaks – it can take 24 hours for the settings to take into effect. Finally, it’s a good idea to backup your website before proceeding. I use UpdraftPlus.

For my own website I use the W3 + CloudFlare + MaxCDN combo in conjunction with SiteGround’s semi-dedicated GoGeek hosting. This is what my GTmetrix report looks like…



Download The Same W3 Total Cache Settings I Use
To download the same settings I use, backup your website then download my W3 Total Cache settings here (you’ll need a Dropbox account). Upload under Performance –> General Settings –> Import / Export Settings. Now check the settings to make sure they match the needs of your website and hosting. You will still need to configure CloudFlare and MaxCDN.



W3 Total Cache Dashboard



General Settings


Here’s my MaxCDN coupon which gives you 25% off your content delivery network. Should be $90/year if you checkout with the annual plan WITHOUT the Asia/Australia option. Now head over to my MaxCDN section to set it up, then come back here once you’re done.


Page Cache


The only other thing you need to do is scroll down a bit and enable compatibility mode (screenshot below). Enabling this is “highly recommended” by the W3 Total Cache team. In the Install Tab they say it “optimizes the interoperablity of caching; the tradeoff is that disk enhanced page cache performance under load tests will be decreased by ~20% at scale.”



Minify Settings

If you’re using CloudFlare you do NOT need to go through these settings since CloudFlare takes care of minify for you. If you’re not using CloudFlare, use these settings:


Leave everything else as is.


Database Cache

  • Leave as is


Object Cache

  • Leave as is


Browser Cache


Leave everything else as is. Some people tweak the expires header lifetime but the plugin developer says you should leave this.



A content delivery network stores your website’s files on multiple servers around the country/world (as oppose to just 1 origin server). This allows visitors to access your content from the closest server, potentially shaving seconds off your load times. I’ve always had good results with MaxCDN and you can use my MaxCDN coupon to get 25% off your plan.

How To Setup MaxCDN With W3 Total Cache
1. Sign up for MaxCDN. My 25% off coupon + 2 free months for annual billing = $90/year (standard plan). I removed the Asia/Australia option during checkout which saves quite a bit. Then use the steps below or watch my video tutorial. MaxCDN also has their own tutorial.

2. In MaxCDN go to Zones –> Create Pull Zone:


3. Replace OMM with your sitename. Use your domain name as the origin server URL then click the “create” button:


4. Click “manage” on the pull zone you created (leave this window open – you will need this):


5. Right click Account –> Open In New Tab –> API –> View All  –> Create Application:


  • Change the name/description with your sitename
  • Leave Application URL and Callback URL fields empty

6. Once you’ve created an API, leave that window open too (so now you should have both your pull zone info and your API info open in 2 different tabs):

MAXCDN-API-Settings-e1426786839107Control-Panel-MaxCDN-e1426789139587 2



7. Head over to W3 Total Cache and navigate to the General Settings tab, scroll down and enable MaxCDN (remember if you’re using a CDN, database cache should be disabled):


8. Move to the CDN tab and configure it with the settings below. You’ll need to enter your alias+key+secret (in that format) from MaxCDN’s API settings (step 6) into W3 Total Cache’s “authorization key” field. Finally, copy/paste your CDN URL found in your pull zone settings (step 4) into the “Replace site’s hostname” field. See my screenshot as a reference:

W3 Total Cache CDN Options

9. Validate, test, save… you’re done!

Here’s some CDN pointers from the W3 Total Cache team (taken from the Install tab):

If you do not use the Media Library, then import your images etc into the default locations. Use the Media Library Import Tool on the “Content Delivery Network” tab to do this.

If you do not have a CDN provider, you can still improve your site’s performance using the “Self-hosted” method. On your own server, create a subdomain and matching DNS Zone record; e.g. static.domain.com and configure FTP options on the “Content Delivery Network” tab. Be sure to FTP upload the appropriate files, using the upload buttons.




Cloudflare – activate and see the next step

Feedburner – activate

Genesis Framework – if you’re using the Genesis Framework you can click the “Upgrade” button in W3TC to buy W3 Total Cache Pro for $99/year. This will enable additional speed features like fragment cache and CDN mirroring which significantly improves site speed. Once purchased, it should say “the plugin is enabled in community mode.” Alternatively, your license key will be sent via email which you can enter in the General Settings tab.

WordPress SEO by Yoast – activate if you’re using Yoast



1. In the W3 Total Cache Extensions tab, activate CloudeFlare
2. Sign up for CloudFlare (free)
3. Configure your DNS records (here’s a video tutorial)
4. Under “choose initial settings” I would select CDN + Full Optimizations
5. You will be prompted to change nameservers
6. In W3TC go to Extensions –> CloudFlare –> Settings
7. Get Your API Key then use these settings:


8. Finally, login to your CloudFlare account and go to Settings –> Page Rules:

CloudFlare Settings

9. These are the page rule settings I use (you can also see CloudFlare’s pages rules tips):

CloudFlare Page Rules


Shared Hosting Settings

For W3 Total Cache shared hosting settings, you’ll want to use the database cache and object cache “disk” method with caution. Test it to see if it yields a performance increase, if not, don’t use it. You can also ask your hosting provider what cache settings to use.


VPS Hosting Settings

These are the recommended VPS hosting settings from the plugin author:

  • APC for database cache
  • Disk enhanced for page cache
  • Disk for minify
  • Memcached for object cache
  • He also suggests checking with your hosting provider


Fixing Common Issues

Website formatting issues – disable the “minify” option in the General Settings tab

Slow WordPress dashboard – disable “object cache” in the General Settings tab

Slower load times than before – disable “object cache” or wait 24 hours for propagation

Other – see their FAQs tab or drop me a line in the comments

Crashed website: open wp-config and delete these lines:

/** Enable W3 Total Cache */
define('WP_CACHE', true); // Added by W3 Total Cache

Open .htaccess and remove all lines between and including:

# BEGIN W3TC ...

Then delete: advanced-cache.php, objectcache.php, and db.php from wp-content. Also delete the w3-total-cache folder in wp-content/plugins.


More Speed Optimizations


W3 Total Cache, CloudFlare, MaxCDN… what a beautiful combination. These aren’t the only factors that affect your page load time though. You’ll want to optimize images, reduce plugin usage, cache gravatar images and use WP-Optimize to delete unnecessary files. Yoast even recommends not using the force rewrite titles option as it can slow down your site.

If you’re looking for more WordPress speed optimization tips like these, check out my full tutorial: Why Is WordPress Slow And How To Get .39s Load Times


Best CDN Providers

MaxCDN vs CDN77

MaxCDN vs CDN77 - Click to enlarge

MaxCDN vs CDN77

After deep research I found that the MaxCDN is leader in CDN business. It has the best connectivity for EU and USA, but they also have the highest prices. Other alternatives are CDN77, which have lower prices than MaxCDN and good connectivity all over the world. They also have better prices than MaxCDN. No monthly commitments and you are on pay as you go. The chart is comparing 10TB traffic on MaxCDN and CDN77.






Cloudflare plans

Cloudflare plans - Click to enlarge

Cloudflare is absolute leader in free CDN. It has the best connectivity and it is free no matter the traffic. It powers more than 2 000 000 websites.There is also a paid plan per domain (not per subdomain) which is $20 for first domain and $5 for every other domain. Which will cost us $30 per month. Other alternative is to use our company’s account. Then the price will be $15 for all of our three domains. We also have features, which the rest CDNs can’t offer such as

  • Minifying the html, css, javascript
  • Optimizing the images
  • Railgun
  • Free SSL certificate
  • Firewall – if someone try to attack us, cloudflare handle the attack and our servers will not be down
  • Improve load time for pages that include images on mobile devices with slow network connections.
  • Free DNS manager
  • RocketLoader – Improve load time for pages that include JavaScript.
  • Browser caching options


CloudFlare protects and accelerates any website online

Once your website is a part of the CloudFlare community, its web traffic is routed through our intelligent global network. We automatically optimize the delivery of your web pages so your visitors get the fastest page load times and best performance. We also block threats and limit abusive bots and crawlers from wasting your bandwidth and server resources. The result: CloudFlare-powered websites see a significant improvement in performance and a decrease in spam and other attacks.

This diagram shows an uprotected website with slow internet and a website protected by CloudFlare with faster internet

CloudFlare’s system gets faster and smarter as our community of users grows larger. We have designed the system to scale with our goal in mind: helping power and protect the entire Internet.

CloudFlare can be used by anyone with a website and their own domain, regardless of your choice in platform. From start to finish, setup takes most website owners less than 5 minutes. Adding your website requires only a simple change to your domain’s DNS settings. There is no hardware or software to install or maintain and you do not need to change any of your site’s existing code. If you are ever unhappy you can turn CloudFlare off as easily as you turned it on. Our core service is free and we offer enhanced services for websites who need extra features like real time reporting or SSL.



Other alternatives

There are other alternatives, which are good as KeyCDN. Some of them are:

See more for CDN