WordPress.org

Ready to get started?Download WordPress

Plugin Directory

W3 Total Cache

Easy Web Performance Optimization (WPO) using caching: browser, page, object, database, minify and content delivery network support.

Why does speed matter?

Speed is among the most significant success factors web sites face. In fact, your site's speed directly affects your income (revenue) — it's a fact. Some high traffic sites conducted research and uncovered the following:

  • Google.com: +500 ms (speed decrease) -> -20% traffic loss [1]
  • Yahoo.com: +400 ms (speed decrease) -> -5-9% full-page traffic loss (visitor left before the page finished loading) [2]
  • Amazon.com: +100 ms (speed decrease) -> -1% sales loss [1]

A thousandth of a second is not a long time, yet the impact is quite significant. Even if you're not a large company (or just hope to become one), a loss is still a loss. However, there is a solution to this problem, take advantage.

Search engines like Google, measure and factor in the speed of web sites in their ranking algorithm. When they recommend a site they want to make sure users find what they're looking for quickly. So in effect you and Google should have the same objective.

Many of the other consequences of poor performance were discovered more than a decade ago:

  • Lower perceived credibility (Fogg et al. 2001)
  • Lower perceived quality (Bouch, Kuchinsky, and Bhatti 2000)
  • Increased user frustration (Ceaparu et al. 2004)
  • Increased blood pressure (Scheirer et al. 2002)
  • Reduced flow rates (Novak, Hoffman, and Yung 200)
  • Reduced conversion rates (Akamai 2007)
  • Increased exit rates (Nielsen 2000)
  • Are perceived as less interesting (Ramsay, Barbesi, and Preece 1998)
  • Are perceived as less attractive (Skadberg and Kimmel 2004)

There are a number of resources that have been documenting the role of performance in success on the web, W3 Total Cache exists to give you a framework to tune your application or site without having to do years of research.

Why is W3 Total Cache better than other cache plugins?

It's a complete framework. Most cache plugins available do a great job at achieving a couple of performance aims. Our plugin remedies numerous performance reducing aspects of any web site going far beyond merely reducing CPU usage (load) and bandwidth consumption for HTML pages alone. Equally important, the plugin requires no theme modifications, modifications to your .htaccess (mod_rewrite rules) or programming compromises to get started. Most importantly, it's the only plugin designed to optimize all practical hosting environments small or large. The options are many and setup is easy.

I've never heard of any of this stuff; my site is fine, no one complains about the speed. Why should I install this?

Rarely do readers take the time to complain. They typically just stop browsing earlier than you'd prefer and may not return altogether. This is the only plugin specifically designed to make sure that all aspects of your site are as fast as possible. Google is placing more emphasis on the speed of a site as a factor in rankings; this plugin helps with that too.

It's in every web site owner's best interest is to make sure that the performance of your site is not hindering its success.

Which WordPress versions are supported?

To use all features in the suite, a minimum of version WordPress 2.8 with PHP 5 is required. Earlier versions will benefit from our Media Library Importer to get them back on the upgrade path and into a CDN of their choosing.

Why doesn't minify work for me?

Great question. W3 Total Cache uses several open source tools to attempt to combine and optimize CSS, JavaScript and HTML etc. Unfortunately some trial and error is required on the part of developers is required to make sure that their code can be successfully minified with the various libraries W3 Total Cache supports. Even still, if developers do test their code thoroughly, they cannot be sure that interoperability with other code your site may have. This fault does not lie with any single party here, because there are thousands of plugins and theme combinations that a given site can have, there are millions of possible combinations of CSS, JavaScript etc.

A good rule of thumb is to try auto mode, work with a developer to identify the code that is not compatible and start with combine only mode (the safest optimization) and increase the optimization to the point just before functionality (JavaScript) or user interface / layout (CSS) breaks in your site.

We're always working to make this more simple and straight forward in future releases, but this is not an undertaking we can realize on our own. When you find a plugin, theme or file that is not compatible with minification reach out to the developer and ask them either to provide a minified version with their distribution or otherwise make sure their code is minification-friendly.

Who do you recommend as a CDN (Content Delivery Network) provider?

That depends on how you use your site and where most of your readers read your site (regionally). Here's a short list:

What about comments? Does the plugin slow down the rate at which comments appear?

On the contrary, as with any other action a user can perform on a site, faster performance will encourage more of it. The cache is so quickly rebuilt in memory that it's no trouble to show visitors the most current version of a post that's experiencing Digg, Slashdot, Drudge Report, Yahoo Buzz or Twitter effect.

Will the plugin interfere with other plugins or widgets?

No, on the contrary if you use the minify settings you will improve their performance by several times.

Does this plugin work with WordPress in network mode?

Indeed it does.

Does this plugin work with BuddyPress (bbPress)?

Yes.

Will this plugin speed up WP Admin?

Yes, indirectly - if you have a lot of bloggers working with you, you will find that it feels like you have a server dedicated only to WP Admin once this plugin is enabled; the result, increased productivity.

Which web servers do you support?

We are aware of no incompatibilities with apache 1.3+, IIS 5+ or litespeed 4.0.2+. If there's a web server you feel we should be actively testing (e.g. lighttpd), we're interested in hearing.

Is this plugin server cluster and load balancer friendly?

Yes, built from the ground up with scale and current hosting paradigms in mind.

What is the purpose of the "Media Library Import" tool and how do I use it?

The media library import tool is for old or "messy" WordPress installations that have attachments (images etc in posts or pages) scattered about the web server or "hot linked" to 3rd party sites instead of properly using the media library.

The tool will scan your posts and pages for the cases above and copy them to your media library, update your posts to use the link addresses and produce a .htaccess file containing the list of of permanent redirects, so search engines can find the files in their new location.

You should backup your database before performing this operation.

How do I find the JS and CSS to optimize (minify) them with this plugin?

Use the "Help" button available on the Minify settings tab. Once open, the tool will look for and populate the CSS and JS files used in each template of the site for the active theme. To then add a file to the minify settings, click the checkbox next to that file. The embed location of JS files can also be specified to improve page render performance. Minify settings for all installed themes can be managed from the tool as well by selecting the theme from the drop down menu. Once done configuring minify settings, click the apply and close button, then save settings in the Minify settings tab.

I don't understand what a CDN has to do with caching, that's completely different, no?

Technically no, a CDN is a high performance cache that stores static assets (your theme files, media library etc) in various locations throughout the world in order to provide low latency access to them by readers in those regions.

What if I don't want to work with a CDN right now, is there any other use for this feature?

Yes! You can take advantage of the pipelining support in some browsers by creating a sub-domain for the static content for your site. So you could select the "Origin Push / Self-hosted" method of the General Settings tab. Create static.domain.com on your server (and update your DNS zone) and then specify the FTP details for it in the plugin configuration panel and you're done. If you disable the scripting options on your server you'll find that your server will actually respond slightly faster from that sub-domain because it's just sending files and not processing them.

How do I use an Origin Pull (Mirror) CDN?

Login to your CDN providers control panel or account management area. Following any set up steps they provide, create a new "pull zone" or "bucket" for your site's domain name. If there's a set up wizard or any troubleshooting tips your provider offers, be sure to review them. In the CDN tab of the plugin, enter the hostname your CDN provider provided in the "replace site's hostname with" field. You should always do a quick check by opening a test file from the CDN hostname, e.g. http://cdn.domain.com/favicon.ico. Troubleshoot with your CDN provider until this test is successful.

Now go to the General tab and click the checkbox and save the settings to enable CDN functionality and empty the cache for the changes to take effect.

How do I configure Amazon Simple Storage Service (Amazon S3) or Amazon CloudFront as my CDN?

First create an S3 account; it may take several hours for your account credentials to be functional. Next, you need to obtain your "Access key ID" and "Secret key" from the "Access Credentials" section of the "Security Credentials" page of "My Account." Make sure the status is "active." Next, make sure that "Amazon Simple Storage Service (Amazon S3)" is the selected "CDN type" on the "General Settings" tab, then save the changes. Now on the "Content Delivery Network Settings" tab enter your "Access key," "Secret key" and enter a name (avoid special characters and spaces) for your bucket in the "Create a bucket" field by clicking the button of the same name. If using an existing bucket simply specify the bucket name in the "Bucket" field. Click the "Test S3 Upload" button and make sure that the test is successful, if not check your settings and try again. Save your settings.

Unless you wish to use CloudFront, you're almost done, skip to the next paragraph if you're using CloudFront. Go to the "General Settings" tab and click the "Enable" checkbox and save the settings to enable CDN functionality. Empty the cache for the changes to take effect. If preview mode is active you will need to "deploy" your changes for them to take effect.

To use CloudFront, perform all of the steps above, except select the "Amazon CloudFront" "CDN type" in the "Content Delivery Network" section of the "General Settings" tab. When creating a new bucket, the distribution ID will automatically be populated. Otherwise, proceed to the AWS Management Console and create a new distribution: select the S3 Bucket you created earlier as the "Origin," enter a CNAME if you wish to add one or more to your DNS Zone. Make sure that "Distribution Status" is enabled and "State" is deployed. Now on "Content Delivery Network" tab of the plugin, copy the subdomain found in the AWS Management Console and enter the CNAME used for the distribution in the "CNAME" field.

You may optionally, specify up to 10 hostnames to use rather than the default hostname, doing so will improve the render performance of your site's pages. Additional hostnames should also be specified in the settings for the distribution you're using in the AWS Management Console.

Now go to the General tab and click the "Enable" checkbox and save the settings to enable CDN functionality and empty the cache for the changes to take effect. If preview mode is active you will need to "deploy" your changes for them to take effect.

How do I configure Rackspace Cloud Files as my CDN?

First create an account. Next, in the "Content Delivery Network" section of the "General Settings" tab, select Rackspace Cloud Files as the "CDN Type." Now, in the "Configuration" section of the "Content Delivery Network" tab, enter the "Username" and "API key" associated with your account (found in the API Access section of the rackspace cloud control panel) in the respective fields. Next enter a name for the container to use (avoid special characters and spaces). If the operation is successful, the container's ID will automatically appear in the "Replace site's hostname with" field. You may optionally, specify the container name and container ID of an existing container if you wish. Click the "Test Cloud Files Upload" button and make sure that the test is successful, if not check your settings and try again. Save your settings. You're now ready to export your media library, theme and any other files to the CDN.

You may optionally, specify up to 10 hostnames to use rather than the default hostname, doing so will improve the render performance of your site's pages.

Now go to the General tab and click the "Enable" checkbox and save the settings to enable CDN functionality and empty the cache for the changes to take effect. If preview mode is active you will need to "deploy" your changes for them to take effect.

My YSlow score is low because it doesn't recognize my CDN, what can I do?

Rule 2 says to use a content delivery network (CDN). The score for this rule is computed by checking the hostname of each component against the list of known CDNs. Unfortunately, the list of "known CDNs" are the ones used by Yahoo!. Most likely these are not relevant to your web site, except for potentially yui.yahooapis.com. If you want an accurate score for your web site, you can add your CDN hostnames to YSlow using Firefox's preferences. Here are the steps to follow:

  • Go to about:config in Firefox. You'll see the current list of preferences.
  • Right-click in the window and choose New and String to create a new string preference.
  • Enter extensions.yslow.cdnHostnames for the preference name.
  • For the string value, enter the hostname of your CDN, for example, mycdn.com. Do not use quotes. If you have multiple CDN hostnames, separate them with commas.

If you specify CDN hostnames in your preferences, they'll be shown under the details for Rule 2 in the Performance view.

What is the purpose of the "modify attachment URLs" button?

If the domain name of your site has changed, this tool is useful in updating your posts and pages to use the current addresses. For example, if your site used to be http://www.domain.com, and you decided to change it to domain.com, the result would either be many "broken" images or many unnecessary redirects (which slow down the visitor's browsing experience). You can use this tool to correct this and similar cases. Correcting the URLs of your images also allows the plugin to do a better job of determining which images are actually hosted with the CDN.

As always, it never hurts to back up your database first.

Is this plugin comptatible with TDO Mini Forms?

Captcha and recaptcha will work fine, however you will need to prevent any pages with forms from being cached. Add the page's URI to the "Never cache the following pages" box on the Page Cache Settings tab.

Is this plugin comptatible with GD Star Rating?

Yes. Follow these steps:

  1. Enable dynamic loading of ratings by checking GD Star Rating -> Settings -> Features "Cache support option"
  2. If Database cache enabled in W3 Total Cache add wp_gdsr to "Ignored query stems" field in the Database Cache settings tab, otherwise ratings will not updated after voting
  3. Empty all caches

I see garbage characters instead of the normal web site, what's going on here?

If a theme or it's files use the call php_flush() or function flush() that will interfere with the plugins normal operation; making the plugin send cached files before essential operations have finished. The flush() call is no longer necessary and should be removed.

How do I cache only the home page?

Add /.+ to page cache "Never cache the following pages" option on the page cache settings tab.

I'm getting blank pages or 500 error codes when trying to upgrade on WordPress in network mode

First, make sure the plugin is not active (disabled) network-wide. Then make sure it's deactivated network-wide. Now you should be able to successful upgrade without breaking your site.

A notification about file owner appears along with an FTP form, how can I resolve this?

The plugin uses WordPress FileSystem functionality to write to files. It checks if the file owner, file owner group of created files match process owner. If this is not the case it cannot write or modify files.

Typically, you should tell your web host about the permission issue and they should be able to resolve it.

You can however try adding define('FS_METHOD', 'direct'); to wp-config.php to circumvent the file and folder checks.

This is too good to be true, how can I test the results?

You will be able to see it instantly on each page load, but for tangible metrics, consider the following tools:

I don't have time to deal with this, but I know I need it. Will you help me?

Yes! Please reach out to us and we'll get you acclimated so you can "set it and forget it."

Install the plugin to read the full FAQ on the plugins FAQ tab.

Requires: 3.2 or higher
Compatible up to: 3.9.2
Last Updated: 2014-4-4
Downloads: 3,749,367

Ratings

4 stars
4.5 out of 5 stars

Support

16 of 297 support threads in the last two months have been resolved.

Got something to say? Need help?

Compatibility

+
=
Not enough data

7 people say it works.
6 people say it's broken.

100,1,1
100,1,1
100,1,1
100,1,1
100,1,1
100,1,1
100,1,1
100,1,1
100,1,1
100,1,1
100,1,1
100,1,1
100,1,1
100,3,3 100,3,3 100,3,3 100,3,3 100,3,3 100,3,3 100,6,6 100,3,3 100,2,2
100,4,4 100,4,4 100,4,4 100,4,4 100,4,4 100,4,4 88,16,14 100,4,4 100,3,3
100,3,3 100,3,3 100,3,3 100,3,3 100,3,3 100,3,3 82,11,9 100,18,18 88,8,7 67,3,2 0,1,0 0,1,0 0,2,0 0,2,0 0,2,0 0,1,0
100,4,4 88,8,7 91,11,10 50,2,1 0,1,0 0,2,0 0,2,0 33,3,1
100,1,1 100,1,1 100,1,1 100,1,1 100,2,2 100,1,1 100,3,3 93,71,66 83,6,5 50,2,1 33,3,1 0,2,0 33,3,1 0,1,0
100,1,1 79,24,19 91,168,153 0,1,0 0,1,0 67,6,4 67,9,6 33,3,1 50,6,3 0,1,0 0,1,0
0,1,0 0,1,0 0,1,0 0,1,0 70,103,72 67,3,2 50,16,8 44,27,12 62,34,21 33,3,1 75,8,6 100,1,1 0,1,0
87,114,99 89,53,47 91,153,139 50,2,1
82,22,18 0,1,0
89,35,31 0,1,0
38,68,26 0,1,0 50,2,1
74,31,23 0,2,0 0,1,0 0,3,0
66,187,124 43,7,3 0,1,0 100,2,2
92,37,34 100,2,2 57,7,4 50,2,1 0,1,0
85,20,17 10,61,6 18,190,35 47,15,7 50,2,1
50,2,1 14,28,4 32,118,38 67,36,24 100,2,2 100,1,1
90,10,9
67,54,36 100,2,2
0,1,0 81,77,62 68,188,128
80,45,36
78,171,133
82,98,80 0,1,0 0,1,0
76,37,28
65,156,101
100,1,1 70,135,95 80,5,4 50,6,3 100,1,1
100,2,2 36,25,9 47,47,22 50,2,1 50,4,2 29,7,2
47,17,8 33,76,25 0,4,0 42,60,25 9,65,6 19,88,17 29,235,68 74,35,26
59,37,22 67,3,2 75,4,3
100,1,1 43,23,10 100,1,1 61,51,31
100,2,2 100,1,1 49,51,25
100,1,1 67,3,2
54,28,15 0,1,0
74,23,17 0,1,0
36,61,22 80,15,12
0,1,0 29,7,2
0,1,0 40,5,2
41,17,7
100,1,1 58,38,22
54,13,7