Almost a month ago, I showed you guys a Step by Step Guide on How To Setup W3 Total Cache. W3 Total Cache 0.9 has been released and is a lot easier to configure. You don’t even have to hack into your .htaccess to enable stuff like browser caching anymore.
With some complaints about the last tutorial being heavy on images, I’ve decided to keep this based on text only.
NOTE: These settings are for shared hosting with self hosted CDN ONLY. These are the exact settings, I’m using here on this blog.
UNDER GENERAL SETTINGS
Make sure to select the following options
- Deselect this option to disable all caching functionality.
- Page Cache and set page cache method to Disk Enhanced.
- Minify and set to Disk.
- Database Cache and set to Disk
- Object Cache and set to Disk
- Content Delivery Network and select Self-hosted/ File Transfer Protocol Upload
- Browser Cache
UNDER PAGE CACHE SETTINGS
Tick the following options
- Don’t cache pages for logged in users
- Cache the home page
- Cache site, categories, tags, comments and feeds
- Garbage collection interval: 7200seconds
- Rejected User Agents: Add the contents of this file there.
- Automatically prime the page cache: Update Interval = 900 seconds, Pages per interval = 10 & Sitemap URL = Link to your XML sitemap.
UNDER MINIFY SETTINGS
Select the following options
- Rewrite URL structure
- Automatically upload modified files
- Minify error notification: Disable
- HTML minify settings: Tick Enable, Inline CSS minification, Inline JS minification & Line break removal
- Update external files every: 86400 seconds
- Garbage collection interval: 86400 seconds
- Rejected user agents: Add the contents of this file there.
UNDER DATABASE CACHE SETTINGS
Leave the default settings
UNDER OBJECT CACHE SETTINGS
Leave the default settings
UNDER BROWSER CACHE SETTINGS
I left the default settings. Everything remained ticked EXCEPT “Do not process 404 errors for static objects with WordPress“. I did this because it was conflicting with the permalink redirects I had set using Scott Yang’s Permalink Redirect plug-in.
UNDER CONTENT DELIVERY NETWORK SETTINGS
Nothing much has changed here so everything explained under this section in the first tutorial applies. Just make sure to tick Force over-writing of existing files.
UNDER USER AGENT GROUPS SETTINGS
I left the default settings
Well folks, that’s all there is installing and configuring the new version of W3 Total Cache . In continuation are a few tips to help increase your PageSpeed and YSlow scores.
HOW TO SETUP A COOKIELESS CDN SUBDOMAIN
Disabling cookies on your CDN hosted files also contributes in it’s own little way to make your blog faster. Two common cookie setters are WordPress and Google Analytics.
Under wordpress, to set cookies for only your top level domain name, you must add the line below to your wp-config.php file
While you’re doing that, also check to make sure that your wp-config.php has the line below which is needed for ANY wordpress cache plug-in to work smoothly.
PLEASE REMEMBER TO BACKUP YOUR WP-CONFIG SHOULD SOMETHING GO WRONG!
To disable Google Analytics setting cookies for your subdomains, your Google Analytics tracking code has to undergo a minor adjustment. You have to set the “_setDomainName” value to your www domain. Like this:
var _gaq = _gaq || ;
ga.src = (‘https:’ == document.location.protocol ? ‘https://ssl’ : ‘http://www’) + ‘.google-analytics.com/ga.js’;
var s = document.getElementsByTagName(‘script’); s.parentNode.insertBefore(ga, s);
That’s all folks. If I discover some more tricks, I’ll add the updates to the end of this page .
This update was made possible by Serving Static Content from a Cookieless Domain, Speeding up ClassiPress and How to Configure W3 Total Cache to Work with WPtouch for WordPress.