Setting up W3 Total Cache part 2

Posted by Matthew Snider with 8 Comments

Yesterday I posted up a pretty lengthy introduction to W3TC, or better known as W3 Total Cache. You can check out Part 1 of the setup document here. In this post I hope to go into a bit more detail on how to get this setup for you all. I aim to give a little more customizations and more details behind what each thing does and why we need it.

Skip to the bottom to grab my config file if you don’t want to read this post!

Lets get to it. The first section we will tackle will be Page Cache.

Page Cache

We have the general section that should be setup like this:
  • Checked – Don’t cache pages for logged in users
  • Checked – Cache home page
  • Checked – Cache feeds: site, categories, tags, comments
  • Not Checked – Cache URIs with query string variables
  • Checked – Cache 404 (not found) pages

Page Cache Settings – Advanced

There really is not need to touch any of these. Out of the box they are setup to help you if you choose to cache your page caches.

Page Cache Settings – Cache Preload

This allows you to serve up pre-cached pages to all visitors, even if a page has not been visited yet. It’s okay to leave this disabled, but if you run into performance problems when the preload activates, try lowering the number in the pages per interval setting.

  • Checked – Automatically prime the page cache
  • Update internal – 900, which is the default
  • Pages per interval – 5, this is setup by default and really can be set as you see fit.
  • Sitemap URL – Your blogs sitemap.xml URL wherever that may be, e.g. http://geekforhim.com/sitemap.xml

Minify Settings

This is where the speed comes from. This is one of the harder parts to figure out if you are new to these types of settings. Look below to my standard config that you could import as stated in Part 1 of the setup document. I would recommend either my config file or at least figuring it out because this is essential to your sites speed increase.

Minify Settings – General
  • Checked – Rewrite URL structure
  • Checked – Automatically upload modified files – this is huge!!
Minify Settings – HTML
  • Checked – Enable
  • Not Checked – Minify Feeds – I don’t think this really accomplished much in terms of speed that you will notice
  • Checked – Inline CSS minification
  • Checked – Inline JS minification
  • Checked – Line break removal
Minify Settings – Javascript

Due to some javascript issues when minified I have chosen not to use this option. If you end up trying it just make sure that all of your content works prior to going live with this option.

Minify Settings – CSS

General Settings

  • Checked – Yes you want to use this functionality!
  • Not Checked – Combine only (unchecked)
  • Checked – Comment Removal (checked)
  • Checked -  Line break removal (checked)

File Management

This portion is a little tricky and you may need a little help on this setup, if so, call someone who can help you out! Okay so what you need to know is the path to your actual CSS file(s). The easiest way to do this to pull up the source of your website. Right click on your website and select view source from the menu. Once there do a control F to find all files ending in .css.

Once found you will need to enter the path as such – wp-content/themes/nameofyourtheme/yourstyle.css – make sure to click verify URI. Once you click this button it should pull up your style.css to validate you have the correct path.

Do the above for all of your CSS files and you are set!

Minify Settings – Advanced Settings

Leave these alone as the default should be more than sufficient to start out this process.

I have used the defaults for the following sections – Database Cache and Object Cache

Browser Cache

This allows access to your .htaccess file to allow for your visitors browsers to be sent certain commands that help your site come up faster for them.

Browser Cache – General / Default
  • Checked – Set expires header
  • Checked – Set cache control header
  • Not Checked -  Set entity tag (eTag)
  • Checked – Set W3 Total Cache header
  • Checked – Enable HTTP (gzip) compression
  • Not Checked-  Do not process 404 errors

The below sections I have left as default and really don’t need to fool around with the settings.

Browser Cache – Cascading Style Sheets & JavaScript, HTML and Media and Other Files

I have used the defaults for the Object Data Cache

CDN

CDN Configuration – this is where you setup your external settings and logins
  • Configuration is ALL dependent upon which CDN service you choose as to what you need to fill out.
CDN General
  • Checked – Host wp-includes/ files
  • Checked – Host theme files
  • Checked – Host minified CSS and JS files
  • Checked – Host custom files
  • Not Checked – Force over-writing of existing files (although this is a good option if you continually update your site files)
  • Not Checked – Import external media library attachments
CDN Advanced – This is left as default settings are more than adequate.

Well this is a pretty solid start to get you on your way to setting up a lightening fast server for your WordPresswebsite. Below I have attached my W3 Total Cache configuration file for those of you who want to skip all of the mubo jumbo and get things up and running fast. PLEASE check in on the CDN settings as I use them and you may not!!

Matthew Snider

Posts Twitter

Matthew is the Editor-In-Chief, and founder of Geek for i. He has produced such posts as Top 5 iPhone Apps For The BathroomMac or PC and many more. His love for iDevices started back when he purchased the original iPhone.

8 responses to Setting up W3 Total Cache part 2

  1. ah man, great that you offered the config file! sweet idea… i should have done that!

  2. thanks for configuration file

  3. Hiren Khambhayta July 8, 2011 at 6:42 am

    Hello metthew, nice article was searching for the detailed details of each options of w3 total cache for many days as the plugin page itself doesnot provide full details
    could you give few details of garbage collection.
    and whats your view related to cloudflare, as I have done all compression and cache, so would it be usefull.
    And at last do you prefer using managed cdn like dnsmadeeasy and are they really required ?

    Waiting for your feedback related to above topics.

    • Honestly I feel Cloudflare is over rated and not necessary IF you use a CDN. We use a CDN and love it here so in my opinion, use something like MaxCDN. We love them.

      • Hiren Khambhayta July 8, 2011 at 11:46 am

        Thanks for the prompt reply matthew,
        I am using rackspace for cdn, is maxcdn better than it?
        Any do you use managed dns like dnsmadeeasy or such? and could you give your opinion that is it really required?

        • MaxCDN is something i like due to the low costs and great customer service. If you are happy where you are, go for it.

          As for managed DNS, I just use what my server has setup via Media Temple, for me that is one more breaking point in the scheme of things.

  4. W3Total cache is a great plugin though a monster to configure correctly.
    I use it with MaxCdn and works well.
    I must say that at the beginning of using total cache I did face major problems with the minify settings
    The Cdn has improves blog speed significantly though
    Greg

Leave a Reply

*

Text formatting is available via select HTML. <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Have you Subscribed via RSS yet? Don't miss a post!