Posts

W3 Total Cache Optimal Settings

W3 Total Cache Optimal Settings

I recently have make my site to run under SSL (https)  after Google’s  announce on “HTTPS as a ranking signal“, but then I discovered the sad part; the speed and performance on my site became slower. After researching and reading reviews around on the web, one of the free, cheap and best solution I found was a pluging call “W3 Total Cache” for wordpress. Again the challenge was how to configure it with my website and hosting service. After looking around on the net and search for the best recommended configuration, I been trying different setups but time after time the speed and performance went even worst. I tested different setups and at the end I found the one that really works for me.

I have a basic web hosting with WordPress CMS on it, no CDN or “extra forces” to make my site run faster. If you are in the same situation and wonder how can you make your blog / site speed up, this can save you some time.

In to your WordPress Dashboard, go to the W3 Total Cache plugging “Performance” click on  > General Settings and follow the instructions bellow:

General Settings:

-Toggle all caching types on or off (at once): Disable

Page Cache

-Page Cache: Enabled
-Page Cache Method: Disk Enhance

Minify
-Minify: Disable (in my case because it doesn’t work properly with my slider, but when enable increases the speed quit a bit)
-Minify Mode: Manual
-Minify Cache Method – Disk
-HTML Minifier: Default
-JS Minifier: Default
-CSS Minifier: Default or CSS Tidy

database Cache

-Database Cache: Disabled

Object Cache

-Object Cache: Disabled

Browser Cache

-Browser Cache: Enable

CDN: Enable if you have the Service available, in my case no.

-Leave Rest of settings as Default

Page Cache Settings

General

-Cache post page: Enable
-Don’t Cache Front Page: Disable
-Cache feeds: site, categories, tags, comments: Disable (why still using feeds?)
-Cache SSL (https) requests: Enable if using SSL (https) if not forget it.
-Cache URIs with query string variables: Disable
-Cache 404 (not found) pages:  Disable
-Cache requests only for yourdomain.com site address: Enable
-Don’t cache pages for logged in users: Enable(It’s good to enable this)
-Don’t cache pages for following user roles: Disable

Cache Preload

-Automatically prime the page cache: Enable
-Update interval: 900
-Pages per interval: 10
-Sitemap URL: your sitemap URL

Purge Policy: Page Cache

-Leave everything as default

Advance

-Leave everything as default

Minify

General

-Rewrite URL structure: Enable
-Disable minify for logged in users: Enable
-Minify error notification: Admin Notification

Html & Xml

HTML minify settings: Enable all but not “Don’t minify feeds
-Ignored comment stems: Leave it as it is

JS

JS minify settings: Enable
-Operation in Areas: Minify and Embed Type (Default (blocking)
-Preserve comment removal: Disable
-Line break removal: Enable
-JS file management Theme: choose your theme if you are using one.

CSS

-CSS minify settings: Enable
-Remove unnecesary backslashes: Enable
-Compress colors: Enable
-Compress font-weight: Enable
-Preserved comment removal: Disable
-Leave everything else uncheck
-@import Handling: Process
-Compression: Standart (balance between readability and size)
-Optimize shorthands: Safe Optimizations
-Case for Properties: Lowercase
-Regroup selectors: Merge selectors with the same properties (fast)
-Css file management Theme: choose your theme name

Advance

Leave it as default

Database Cache

General

Don’t cache queries for logged in users: Enable

Advance

Leave it as default

Object Cache Settings

Leave it as default

Browser Cache Settings

General

-Set Last-Modified header: Enable
-Set expires header: Enable
-Set cache control header: Enable
-Set entity tag (eTag): Enable
-Set W3 Total Cache header: Enable
-Enable HTTP (gzip) compression: Enable
-Prevent caching of objects after settings change: Disable
-Don’t set cookies for static files – Disable
-Do not process 404 errors for static objects with WordPress– Disable

CSS and JS

-Set Last-Modified header:  Enable
-Set expires header: Enable
-Expires header lifetime: 31536000 seconds
-Set cache control header: Enable
-Cache Control Policy: cache with max-age
-Set entity tag (eTag): Enable
-Set W3 Total Cache header: Enable
-Enable HTTP (gzip) compression: Enable
-Prevent caching of objects after settings change – Disable
-Disable cookies for static files: Disable

HTML and XML

-Set Last-Modified header: Enable
-Set expires header: Enable
-Expires header lifetime : 3600 seconds
-Set cache control header: Enable
-Cache Control Policy: cache with max-age
-Set entity tag (eTag): Enable
-Set W3 Total Cache header: Enable
-Enable HTTP (gzip) compression: Enable

Media and Other Files

-Set Last-Modified header: Enable
-Set expires header: Enable
-Expires header lifetime: 31536000 seconds
-Set cache control header: Enable
-Cache Control Policy: cache with max-age
-Set the entity tag (eTag): Enable
-Set W3 Total Cache header: Enable
-Enable HTTP (gzip) compression: Enable
-Prevent caching of objects after settings change: Disable
-Disable cookies for static files: Disable

Where to Download Plugin
W3 Total Cache by Frederick Townes
http://www.w3-edge.com

And thats it! this is the best configuration I have found for my wordpress site, but have in mind that every website has its own server configuration, plugins or theme. I hope this can be helpful to you and will save you some time if you have a website that is similar.

P.D: Remember at the end to clear all caches in W3 Total Cache Dashboard after the changes has been made.

Portfolio Items