How To Configure The Various W3 Total Cache Plugin Settings For Your WordPress Blog

Ads by Google

icon big   How To Configure The Various W3 Total Cache Plugin Settings For Your Wordpress BlogA while ago I talked about the benefits of installing the W3TC plugin on your WordPress blog in order to speed it up with various caching, but some readers were understandably a little wary about the plugin without some sort of tutorial to help them through the process. Luckily, the defaults will work well for 90% of us.

Bear in mind, I’m not an expert on the subject and to deal with everyone’s individual issues may be difficult. Follow the guide, and if you hit a snag then it’s likely that someone else has also, so a quick Google search reveals a lot. This plugin is difficult to configure perfectly for optimum performance, but even with some basic settings you’re going to see some form of speed improvement.

Some things to bear in mind though – if you’re running anything on a shared hosting provider, your results will vary and you may even see little or no improvement in performance. There is only so much a plugin can do for you – if the disks are slow, if CPU cycles are limited, and your database provider is running slowly in another remote part of the world….well, there will be no miracles. This plugin will perform best for you when running on at least a virtual private server level of hosting. But that’s not to say you shouldn’t give it a go anyway even if you are on shared hosting.

Ads by Google

Activating The Plugin & File Permissions Errors

Assuming you’ve downloaded and tried to activate the plugin, you may find a slew of errors appearing related to permissions. Tackle them one by one as the plugin instructs and you should be fine.

1. WP-Content Is Not Writeable

wp content error   How To Configure The Various W3 Total Cache Plugin Settings For Your Wordpress Blog

Log into FTP and change the file permission information for the folder “wp-content” to 777

permissions   How To Configure The Various W3 Total Cache Plugin Settings For Your Wordpress Blog

2. Unable To Edit WP-Config.php

wp config error   How To Configure The Various W3 Total Cache Plugin Settings For Your Wordpress Blog

Easiest to just edit this file yourself. Just open it up and add the line as the instructions specify. This turns on WordPress built-in caching abilities that w3TC needs to work.

wp cache edit config   How To Configure The Various W3 Total Cache Plugin Settings For Your Wordpress Blog

3. .htaccess Is Not Writeable

htaccess error   How To Configure The Various W3 Total Cache Plugin Settings For Your Wordpress Blog

Again, change the file permissions on this, via FTP, to 777 temporarily. The plugin will also give you a helpful reminder to change the wp-content permissions back once you’re done.

Bear in mind that when preview mode is enabled, the changes won’t occur until you click deploy – or you can just turn on preview mode and work with the site live.

Check Compatibility

compatibility check   How To Configure The Various W3 Total Cache Plugin Settings For Your Wordpress Blog

The button to perform a compatibility check should be your first action, as it will determine what w3tc can actually do for you and will be the primary limited factor. If you have your own private server then configuring areas in red or orange shouldn’t be difficult, but on shared hosting you are generally stuck with what they give you. Here’s some helpful tutorials on how to fix some of the individual points it will likely pick out as not optimal:

compatiblity list   How To Configure The Various W3 Total Cache Plugin Settings For Your Wordpress Blog

Note On CDNs: Configuring a CDN would take another article and is something I might cover at a future date. For now, be sure to disable the CDN functionality.

Now that we have some caching abilities set up and the plugin installed and activated, let’s look at configuring the individual components of the plugin.

Page Caching

If you have installed some caching extensions on your server or your shared host provides one for you, you should  be able to select them on the main configuration page for page caching and others too.

cache method select   How To Configure The Various W3 Total Cache Plugin Settings For Your Wordpress Blog

The individual configuration for page caching is fine as defaults, so leave them as is.

Minify

This is where the difficulty comes in for most people, but luckily there is a help wizard to get you started. By default, nothing is actually minified so you will need to use the wizard or manually enter filenames if you want something to happen. I’d suggest running the wizard, which will search through your theme files and identify any scripts and CSS being called.

minify help wizard   How To Configure The Various W3 Total Cache Plugin Settings For Your Wordpress Blog

Unfortunately, there are no hard and fast rules here for what can and can’t be minified. CSS should be OK to simply minify everything, but Javascript can give you some real headaches. Here are some general rules to stick to:

  • Analytics and tracking codes shouldn’t be minified, so uncheck them.
  • Amazon and other ad modules shouldn’t be minified.
  • The order is very important, and should be minified in the order they appear in the theme code.
  • Don’t enable comment removal if using jQuery.

If you’re using jQuery plugins such as cufon, be sure to minify the JS in a logical order: jQuery -> cufon -> fonts. I also had issues when embedding outside of the head so leave all embedding in the head as the default is the safest option.

Other Settings

Everything else should work fine with the defaults. Once you’ve confident you’ve got it working, head on over to pingdom again to test the speed. Using only the basic settings above, I managed to get my site from 10 seconds down to 5.5 seconds, and that’s without any additional server-side caching modules.

Further support

For setups beyond the basic, the WordPress.org W3TC plugin forum is a great source of troubleshooting information as you can be sure you aren’t the first to have difficulties. The plugin creator is also often on hand to help out, which is rare for free software of this quality. You’re also welcome to post a comment here or on the answers forum with your specific issues, but I can’t promise anything.

Let us know how it works out for you, and how much of an improvement you see in your site.

Ads by Google

14 Comments - Write a Comment

Reply

Tamar Weinberg

I never heard anyone call it W3TC, but Frederick, the creator of the plugin, tells me he sometimes calls it W3TC (just not officially). Couldn’t you have mentioned W3 Total Cache anywhere in the title, headline, or even the body of the article, though? I bet you’d get more search traffic if you did.

James Bruce

Good Tamar, Ill change the title , Thanks!

Tamar Weinberg

Thanks James. :) The title made me think twice – was it about W3 Total Cache after all? Glad to know it was — it’s a great powerful WordPress plugin!

Reply

Mark

I got it all to work but not the JS minification — it always screws up my Cufon. I went as low as minifying a single JS file (which was not Cufon) and it still doesn’t run my Cufon. It seems if I have any JS minification on (no matter what files) it always causes my Cufon init code not to run. Has anyone else had this issue?

James Bruce

That’s very weird. JS minification by itself shouldn’t do anything at all if files aren’t added to it.

Reply

Anonymous

Thanks for the guide! But the great plugin is still too tough for me…I’ve tested after installation and the results change everytime: at first it showed 2.7 sec, then – 7.4, then – 11+… weird. Cant dig deeper though..

Reply

James Bruce

Sorry truekolor, looks like you need to investigate settings for your individual host a little more. Are you on shared hosting? If you are on shared, there’s very little you can do to improve the situation other than getting some decent hosting.

Where do your numbers come from, pingdom?

My advice would be to make sure minify is working first for all JS and CSS/ HTML, and get that down solid. That’s an improvement that will work on any host.

Reply

DJMorrisInc

My site was working great for months with W3TC, but unfortunately the latest update is giving me issues now.

James Bruce

Hmm, can you roll-back to last working version? Updates like that I generally steer clear of unless I’m already having problems – it’s not like the update will make it run any faster, and is generally just new features or compatiblity fixes, inevitably breaking something else along the way. Stick to the old version~

DJMorrisInc

Do you think I should delete the plugin and then do a reinstall via ftp? Or should I just overwrite….it would be nice if my settings were all salvageable. Thanks for your reply.

James Bruce

I dont think there’s a downgrade option, likely your settings will have been upgraded and now no longer useable for downgraded version – but worth a try. Delete the plugin thorugh FTP and associated files (caches etc) without deactivating it , then re-upload old version. Will soon see if it’s compatible settings wise or not. It is quite an intricate plugin that tends to stick its little fingers into everything, so if that doesnt work you’ll need to spend a bit of time trying to remove it 100% before reinstalling and redoing your settings – hopefully it wont come to that.

Aibek

If adding the older version won’t work try contacting your host and see
if they can restore your config files from a recent backup. That should
definitely work but you might end up loosing comments and posts that
were added since last backup. Those are easily recoverable if you’re a
bit familiar with MySQL.

Reply

Dedy

You set the permission to 777
how about the security??

James Bruce

“The plugin will also give you a helpful reminder to change the wp-content permissions back once you’re done.”

If you follow the steps, you will get a warning message telling you change it back. This tutorial assumes you actually following it. 

Your comment