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.
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.
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.”
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.
- Leave as is
- Leave as is
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):
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:
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:
9. These are the page rule settings I use (you can also see CloudFlare’s pages rules tips):
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 ... # END 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
Hire A WordPress Speed Optimizer
You can hire the same guy I use on freelancer.com by signing up and searching for user bdkamol who is $20/hour. If you look at my speed optimization work it was primarily him that optimized multiple WordPress sites to load 400% faster. I have paid him more than $20,000 in WordPress development and speed optimization because he is so good ($160 for 8 hours of work goes a long way). He’s in Bangladesh, speaks decent English, and is the one who optimized my own site. When you search, make sure “online users” is turned off.
Well that’s it! I know it can get a bit technical so if you have any questions then drop me a line in the comments. And if you enjoyed my tutorial, please share. I would appreciate that!