Beginner's Guide for WordPress - Start your WordPress Blog in minutes.
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
WordPress Plugins
View all Guides

How to Install and Setup W3 Total Cache for Beginners

Last updated on by
Special WordPress Hosting offer for WPBeginner Readers
How to Install and Setup W3 Total Cache for Beginners

We often get compliments from users on how fast our site loads. Everyone wants to know the secret behind a fast loading WordPress site. Aside from good web hosting and well-coded plugins, you have to make sure that you’re using proper caching and have a CDN (content delivery network). For our setup, we use a plugin called W3 Total Cache. Due to a high volume of request, we have decided to create a step by step guide on how to install and setup W3 Total Cache for beginners.

In this article, we will show you how to install W3 Total Cache and set it up properly to maximize the benefits. We will also show you how to combine W3 Total Cache wit ha CDN service to make your site load even faster.

Before you begin, we highly recommend that you check performance of your site by using Google Page Speed and Pingdom Tools. This will give you a before and after comparison.

Below is the screenshot of our Pingdom results:

WPBeginner Pingdom November 21st

Lets get started with our setup of W3 Total Cache.

Video Tutorial

If you don’t like the video or need more instructions, then continue reading.

What is W3 Total Cache?

W3 Total Cache is the fastest and most complete WordPress performance optimization plugin. Trusted by many popular sites including: AT&T, Mashable, Smashing Magazine, WPBeginner, and millions others. W3 Total Cache improves the user experience of your site by improving your server performance, caching every aspect of your site, reducing the download times and providing transparent content delivery network (CDN) integration.

Installing W3 Total Cache in WordPress

Before you install W3 Total Cache, you need to make sure that you uninstall all other caching plugins (for example WP Super Cache). If you do not do this prior to installing, the plugin will have issues upon activation.

We have a very thorough guide explaining how to install a WordPress plugin which you can follow. Or you can follow the brief guide below:

Go to your WordPress admin panel and click on Plugins » Add New. Search for “W3 Total Cache” and you should see results like the image below:

Installing W3 Total Cache plugin for WordPress

Click on the Install Now button and then activate the plugin.

Settings and Configuration of W3 Total Cache

W3 Total Cache is a very powerful plugin, so it has tons of options. This could be a good thing or a bad thing. For those who know how to use these options, they are a gold mine. For most beginners, these options could be quite tricky and confusing. We will visit each of these options in detail, so you can properly set up W3 Total Cache. Lets start with general settings.

General Settings

You can go to the General Settings page by clicking on the Performance menu button in your WordPress admin panel. This is where you will set up the plugin by configuring basic settings. Make sure that you’re on the general settings page and not the promotional Dashboard page that this plugin has.

W3 Total Cache General Settings Page

What is Page Cache?

The first option that you see on this page is Page Cache. It is responsible for creating static cache pages for each page that is loaded, so it is not being dynamically loaded upon each page load. By having this enabled, you will significantly decrease your load time. Refer to the image below to see how Page cache works:

What is Page Cache?

As you can see normally when a user comes to your site, WordPress runs PHP scripts and MySQL queries to the database to find the requested page. Then PHP parses the data and generates a page. This process takes server resources. Having the page caching turned on, allows you to skip all that server load and show a cached copy of the page when a user requests it.

For shared hosting which most beginners use, the Disk:Enhanced method is highly recommended. You should check the Enable Page Cache box, and save all settings.

Setting up Page Cache in W3 Total Cache for WordPress

For most folks, this is all you need to do with page caching. Since this guide is for beginner level users we will skip the advanced settings of page caching because the default options are sufficient enough.

We will also skip through Minify, Database Cache, and Object Cache. The simple reason is because not all servers provide optimized results with these settings. Next option you will see is Browser Cache.

What is Browser Cache?

Every time a user visits a website, their web browser downloads all the images, CSS files, JavaScripts, and other static files in a temporary folder to enhance the user experience. This way when the same user goes to the next page, it will load much faster because all the static files are in their browser cache.

Browser Cache option in W3 Total Cache sets a time limit on the Browser Cache. Considering you don’t change your logo every day, having static files like that cached for 24 hours does not hurt you. Simply check the Enable under Browser Cache option and click Save all settings button. Once you have done that, then lets visit the Performance » Browser Cache page for more settings.

Setting up Browser Cache options in W3 Total Cache

As you can see in the image above, we pretty much enabled everything except for the 404. When you save the settings, all settings below on that page will automatically take care of itself.

In our free WordPress setups, these are the default settings that we turn on.

What is a CDN?

CDN stands for Content Delivery Network which allows you to serve your static content from multiple cloud servers rather than just one hosting server. This enables you to reduce server load and speed up your website.

We have created an infographic on What is a CDN and Why you Need a CDN for your WordPress site. We highly recommend that you check it out, so you can make an educated decision.

W3 Total Cache supports MaxCDN, Amazon S3, Rackspace Cloud, and Amazon Cloud Front. WPBeginner is using MaxCDN (why we use MaxCDN). This section will only apply to sites that are using CDN, or are planning on using CDN. If you think you will be using a CDN, then we recommend MaxCDN (use coupon “wpbeginner” for 25% off).

First thing you need to do to is create a Pull Zone in your MaxCDN dashboard. Log in to your MaxCDN account, click on Manage Zones and then click on Create Pull Zone button.

Configure W3 Total Cache - MaxCDN Settings

On the next screen you will be asked to provide details for your pull zone.

  • Pull Zone Name: Simply give any name to this pull zone so that you can identify it in your MaxCDN panel.
  • Origin Server URL: Enter your WordPress website’s URL starting with http:// and ending with a trailing slash / at the end.
  • Custom CDN Domain: enter any subdomain, for example:
  • Label: Provide description for this pull zone.
  • Compression: Enabling compression will save you bandwidth so it is highly recommended that you check this box.

A screenshot of how the above mentioned settings will look like:

MaxCDN Pull Zone Details

Click on the Create button and MaxCDN will create the Pull Zone. On the next screen, it will show you a URL like this one “” copy and save this URL in a text file using notepad because we will need this later.

Now that we have created a Pull Zone, the next step is to set up content zones. You can do this by going to your MaxCDN dashboard. Click on the manage button next to your pull zone that you just created. On the next screen, click on the Settings tab. The purpose of creating content zones is to add subdomains, so that we can improve user experience by queuing content from different subdomains into user’s browser. To do this click on the button labeled Custom Domains and add multiple subdomains. See the screenshot below:

MaxCDN Multiple Subdomains

Once you have added custom domains simply click on the Update button.

The next step is to set up CNAME records for the subdomains. Most of our recommended WordPress Hosting providers such as Hostgator, Bluehost, etc provide a cPanel to their clients to manage different settings of their hosting. We will describe how to set up a CNAME record in cPanel.

Log in to your cPanel dashboard and then click on Simple DNS Zone Editor under Domains.

Configure W3 Total Cache - Adding a CNAME Record

On the next screen you will see a form with two fields. Enter the subdomain name you entered while creating the content zone. For example you will put cdn for

cPanel will automatically fill in the full domain. In the CNAME field enter the URL provided by MaxCDN when you created the pull zone. It is the URL we asked you to save in notepad.

Configure W3 Total Cache - Adding a CNAME Record

Repeat the process for all your subdomains, e.g. cdn1, cdn2, etc. Remember that only the name field will change each time and the CNAME field always have the url provided by MaxCDN for your pull zone. Once you have created CNAME records for all subdomains, it is time to go back to WordPress and setup MaxCDN with W3 Total Cache.

Go to Performance » General Settings. Scroll down till you find CDN configuration box. Check Enable and select MaxCDN from CDN Type drop down menu. Click on Save All Settings button.

Enabling MaxCDN in W3 Total Cache

After saving settings you will see a notification informing you to provide information for “Authorization Key” and “Replace default hostname with” fields and select a pull zone. Click on “Specify it here” link and W3 Total Cache will take you to the CDN page.

W3 Total Cache specify settings for MaxCDN

On the next screen click on the Authorize button. This will take you to MaxCDN website where you will generate an authorization key. Copy and paste this key back in W3 Total Cache. In “Replace site’s host name with” enter the subdomain you created earlier.

Entering MaxCDN API key and setting up hostname in W3 Total Cache

Save all settings and that’s all. Your site is now configured to serve static files using MaxCDN. Now if you load your site, the image URLs should be served from the CDN subdomain rather than your site’s actual domain. For example:

would be replaced with:

Now if any of your static files are not loading with the CDN, then it probably means that you will need to specify it in the custom files list setting in W3 Total Cache. We had to do it for OIO Publisher plugin that we use for serving ads. If you go to the CDN settings page, you will see the Advanced option:

Advance CDN settings in W3 Total Cache

Simply add all the files/folders that you want to include for CDN. Also if you notice, there is a rejected file list. When you make a small design update, your style.css will not update right away. So you can put that in a rejected file list for the time that you are making changes. If you just want a one-time purge, you can do that from your MaxCDN dashboard.

Everything that we have covered up till now, will work great on most web hosting accounts. However, W3 Total Cache comes with many other options. We will try our best to explain what they are, and why we do not enable them on all sites.


Minify simply reduce the size of your static files to save you every single kilobyte that you can. However, sometimes generating that minified file can be more resource intensive then the resource it will save. We are not saying that it is a horrible function. We are simply saying that it might not be the best fit for every server. We have heard numerous users complaining about it, and our host (HostGator) recommended us to leave this off. If you are like us (NOT SAVVY with server lingo), then listen to your web hosting provider.

Database Caching

Database caching reduces the server load by caching SQL queries. This eliminates the processing time of querying the database (which may not be a lot for smaller sites). When we started using this, it seemed to put a lot of load on our server. Our host recommended us to turn it off. Instead, they ended up turning on the built-in SQL caching for us. Again, use this option at your own risk. You can try it out and see how it impacts your site load time. Then simply turn it off, if the impact is not significant enough. Most hosts do not recommend this for shared hosting accounts.

Object Caching

If you have a highly dynamic site, then using the Object Caching will help. This is mainly used if you have complex database queries that are expensive to regenerate. For most beginners, ignore it.

Now that you have everything setup, it is best to create a backup for your W3 Total Cache Configuration. After all, we went through a lot in this article. You will need to come back to your W3 Total Cache’s General Settings Page. There is a section for Import / Export Settings. Click to Download the settings file from your server.

We hope that you found this article useful. For those users who are still not sold on the concept of CDN, we highly recommend you give it a shot. CDN works with your web host to decrease server load and increase site performance. We are using MaxCDN and we recommend you to do the same. (Try them for just a month, and you will see why we recommend them). Use the MaxCDN coupon “wpbeginner” for 25% off.

If you have any questions, then please feel free to ask in the comments below.

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi. Page maintained by Syed Balkhi.

WPBeginner's Video Icon
Our HD-Quality tutorial videos for WordPress Beginners will teach you how to use WordPress to create and manage your own website in about an hour. Get started now »


  1. Mody Star says:

    Hello , I’m using w3 Total Cache on multisite wordpress … I want to exclude certain site from being excluded
    I want to exclude the whole site from being cached
    and what about exclude caching of certain plugin on
    Help me Please :)

  2. Utkarsh says:

    I did the settings of W3 total cache plugin and the favicon of my website stopped appearing. Can you please check it

  3. Jon says:

    I downloaded plugin and now its loading slower.

    Each time I test in pingdom the % faster than other sites decreases.

    Its only a 1 page site at this time.

  4. Ian Smith says:

    I recently set up W3 Total Cache with the Rackspace Cloud Files CDN. It all works, but I had expected the media files in the wp-content/uploads folder to only be posted in the CDN rather than on the server. Instead, media uploads now go to both the CDN AND the wp-content/uploads folder. Is this what is supposed to happen? It seemed unnecessarily redundant to me.

    • WPBeginner Support says:

      Yes, but the images on your server are stored so that you can end using CDN service anytime you want, or move to another service, or to create backup using WordPress backup plugins. However, your visitors will be served images from the closest CDN server instead of your site.

  5. Himanshu Grewal says:

    MAXCDN is free ir not??

  6. Ian says:


    Are you still using maxcdn on this site? I’m trying to decide between maxcdn and keycdn. I noticed this post was from a few years ago and wondered if your thoughts about maxcdn are still the same?


  7. Bart Percy says:

    Superb site you have here but I was wondering if you knew of any forums that cover the same topics discussed in this article? I’d really like to be a part of group where I can get feedback from other knowledgeable individuals that share the same interest. If you have any suggestions, please let me know. Bless you!

  8. ROSANNA says:

    Hi ! I installed yesterday Super Cache because it seemed easier to configure than W3 Total Cache but this morning my site was very very very slow… So I decided to follow your tutorial step by step and change plugins.
    So, the first step was to deactivate the first plugin, so I clicked deactivate Super Cache and my whole site crashed !!! I get this message : 503 SERVICE UNAVAILABLE no server is available to handle this request.
    I don’t know what to do. Can you help ?

  9. Anant says:

    Minify via disk is currently disabled

    I tried to check the box and when I save after the refresh, it’s disable. enabling it 100 times over still results in an unchecked box, and the message “Minify via disk is currently disabled. Anyone know how to fix that ?
    Thank you


  10. TJ says:

    Thank your this tutorial. I have used it for a couple of my sites.

    One thing, which might be a “duh” situation… But, I had my site in “Maintenance Mode” using SeedProd’s Coming Soon Pro. I did not see the CDN in front of the image urls until I turned off maintenance mode. Then, when I turned it back on again, they were gone again.

    Just in case someone needs this information :-)

  11. Rahul says:

    hi there, thanks for making this post for wp beginners. i’m also using wp total cache plugin for . could you help me or check my website what is problem in this becasie i’m not getting hits pls help me a humble request to u

  12. Jewel says:

    I appreciate so much, your posts. They have helped me learn a bit about setting up my website. However, this particular post led me to check a bunch of boxes under”Performance » Browser Cache” that took me from faster than 91% down to faster than 71% on speed. I had checked them just as you have in your picture above. I unchecked all your suggested boxes and got back to 84%. (on Pingdom) This was the only change I made. I don’t understand why it made things slower, or why I couldn’t get back to my original speed. If you could explain this I would appreciate it. Thanks.

    • WPBeginner Support says:

      A lot of reasons can show you conflicting results when you are expecting something different. For example, you may have forgotten to save plugin settings, your server is particularly under heavy traffic at that time. Make sure you enable gzip compression as we have shown above, then test.

  13. sojib says:

    I am not using this cace plugin anymore. Using now wpfc two of my site. simple and faster then other plugins.

  14. Tea says:

    Thanks for the tutorial…really helpful
    However my website is slower then before.

    I also have these performance issue “Remove query strings from static resources”.

    I haven’t enabled database caching and Minify as per your insutrctions as yet…also don’t have CDN service.

    before my website was faster.
    Any thoughts?

    • WPBeginner Support says:

      How are you checking your website speed and performance? We recommend testing with pingdom using different locations. If it is still slow, then try resetting the plugin and follow the setup instructions again.

      • Tea says:

        yes using pingdom to test and speed is 2.55s…I think we can do better :)

        All my performance scores are 100 or 95 the lowest, but the “Remove query strings from static resources” is at 12.

        Any suggestions?

        Many thanks

  15. Lifa says:

    This has to be one of the best if not the best WordPress learning sites ever! Detailed and very easy to understand modules. Thank you for all your hard researched work.

  16. Penelope says:

    THANK YOU FOR MAKING THIS! I’m EXTREMELY cautions on the plugins I install from horror stories. I’ve also heard horror stories about this very plug in. Therefore, I research as much as I can: tutorials, forums, reviews, troubleshooting etc. I am going to follow your tutorial exactly. My server says my site is too large, 500kb, and needs to be gzipped. [sigh] Another plugin to search.

    Helpful note: You may have a downloadable instructions on your site somewhere & I am not see it. But It would be helpful if I could download to print OR this was print friendly. you have have link but I am not seeing it.


  17. Keami says:

    When I check the box for enable for page cache and click save all setting it doesn’t stay checked. Help please?

  18. reza says:

    Please Inform That if Enable Object Cache is checked may cause very slow or accessible admin panel after some times as happened to me and i have to disable object cache and after that i have no problem with this Great plugin

    TnX for your tutorial too

  19. deepa tiwari says:

    Thanks for sharing . I tried to install W3 total cache showing Error not Available for you. How to fix it. Please help me

  20. Manu says:

    i always come back for W3 Super Cache settings after messing-up with the plugin and i never back or restore its settings :P because i know where to look for it.

    Thanks Wpbeginner for this awesome tutorial.

  21. tracey sharp says:

    Many thanks for this really detailed step by step guide. I’ve installed google adsense along with a couple of other plug ins and my load time seems to have almost ground to a halt. I’ve installed Total Cache which has helped a little but I’m not sure what to do next. I’ll keep looking!

  22. Hasnain Abid Khanzada says:

    I have one question that as we know that when we open any new website then browser cache it so then why we need any plugin for improving cache performance?

  23. Muhammad Imran says:

    Hello WPB team,
    I have connect MAxCDN by following all the guidlines as suggested in the article. But after some days my 99% images de-indexed in Google. Please is there any tutorial to FIX this? Will be very thankful to you for the help.


  24. Tristian says:


    I do have one question, when static pages are created for example you have 200 pages and just installed and set up W3 cache. So now when static pages will be created for all those 200 sites.
    Do you have to load it manually every site by site in your browser ? I understand that this action takes some time so when exactly those sites are created ( static copies on a disk) ?

  25. Ali Emami says:

    When I Click on “Specify it here” link, W3 Total Cache does not take me to the CDN page
    I go to this address:

    What should I do?
    Help me please

    Thank You

  26. Nabeel says:

    This page is at 91 score on pingdom

  27. Sacha says:

    Thank you! I was having a lot of trouble with this plugin and now I have it working perfectly!

  28. Abhishek says:

    Hi team,

    Awaiting the update for this post, I use Cloudflare (free) with wordpress and my GTMetrix results are now anything but good. The blog I need help with is:

  29. Sandy says:

    I installed the W3 plugin and it works great alone, however when I setup and account with a CDN my whole site slowed down to less than half the speed. From 2 seconds to sometimes 6 seconds on average.
    I think the CDN part is of no value if you have a good host server. Digital Ocean has very good performance alone.


  30. Palla Sridhar says:

    How do I use Cloudflare with W3TC. Is there no support for it.

  31. Lynne Adams says:

    I have used this tutorial every time I install the W3 Total Cache plugin with no problem. This time I went a step further in your tutorial and under Performance » Browser Cache page for more settings I checked the ones you recommend. When testing the site on PageSpeedGrader I get an error that reads

    DataTables warning: table id=recommendations – Cannot reinitialise DataTable. For mor information about this error, please see .

    Is this something to be concerned with?

  32. Debbie Bridge says:

    Just wondering does it matter if your site is a rather than a for this plugin?

  33. Lyheang IBell says:

    W3 Total Cache error:It appears Minify URL rewriting is not working. Please verify that the server configuration allows .htaccess
    Unfortunately minification will not function without custom rewrite rules. Please ask your server administrator for assistance. Also refer to the install page for the rules for your server.
    Technical info ?

  34. Julian says:

    I think this post needs an update.

  35. D says:

    I like how people ask questions and the author never replies. Are you guys in the business or helping people or link bait in order to sell/”recommend” paid plugins and such?

    Just answer people’s questions a little and the rest of the web won’t think of you as poorly.

  36. Arsalan Mughal says:

    I am using Godaddy’s wordpress managed hosting on . I want to install W3 Cache plugin because of so many options in it. But the button for W3 Cache “Install Now” is disabled and show “This plugin is not allowed in our system…”. I talked to Godaddy support team but they said you need not to worry about any cache plugin and you can’t install W3 Cache as there is also a tool option “Flush Cache” in wordpress bar.
    So, i just want to know from you, is there any possibility that i can be able to install W3 Cache plugin? If not, Is there really no need of Cache plugin in WP managed hosting by godaddy.
    Can you guide briefly?

    • WPBeginner Support says:

      Managed hosting providers sometimes use their own caching systems and optimize their servers for optimal performance. Sometimes they may block plugins that they believe will cause conflicts with their servers. If your host is blocking a plugin then it is best not to use that plugin or move to a host that supports your desired plugin.

  37. Kate says:

    Hi there! Hoping you can help. Yesterday I downloaded the plugin & followed your instructions. I haven’t done anything about CDN yet. (FYI The plugin seems to look a bit different to your video screenshots… More fields are prepopulated). Anyway, whilst the site is faster (yay!) I noticed this morning that my new post which published today isn’t appearing on my homepage ( which all new posts usually do). It’s just appearing in it’s nominated page. I wondered if you knew what the issue might be? Is something ticked in the plugin which shouldn’t be?
    Thanks, Kate

  38. Adam Thomas says:

    Wow, followed the video instructions and my website used to be “70% slower than all websites”. It’s now “61% FASTER than all websites tested” on Pingdom.

    Thanks a bunch for the video. Everyone says use W3 Total Cache but I never knew how to actually set it up. I was getting really frustrated at my 10+ seconds loading time.

    Now down to 2.49 seconds. Not perfect but much better considering this is the only thing I’ve done to try to improve speed.

    Thanks again!

  39. WPBeginner Staff says:

    Please contact MaxCDN support.

  40. Mathieu says:

    Hi and thanks for another very well written article. This website is definitely becoming a reference for me.
    I was about to signup on MaxCDN and follow all the steps when I realise that my hosting provider doesn’t allow me to edit the DNS. It isn’t one of your recommended hosting providers for wordpress and I start to understand now why :)
    Anyway, I talked to my hosting provider and its suggestion was to add a subdomain service to my hosting. This optional subdomain service includes DNS configuration. So assuming my website is, I could add a subdomain like with DNS options.
    Now the question is: would it work the same way? Or MaxCDN needs to create the subdomains itself? Also, considering that my website would still run on the main domain and not on the subdomain. So I would activate that subdomain just to be able to edit DNS really.
    I hope that I explained myself clear enough, I admit that this is still a little bit complicated for me to understand.

  41. Richelle says:

    Hi! I’ve been trying to get W3 Total Cache to work forever, but I’m always having issues. I followed all your instructions above, and right now it says:

    New Relic is not running correctly. The plugin has detected the following issues:

    PHP module is not enabled.

    PHP agent is not enabled.

    API Key is invalid.

    Account ID is not configured.

    Application ID is not configured. Enter/Select application name.

    License key could not be detected.

    A configuration issue prevents CDN from working: The “Authorization key” and “Replace default hostname with” field(s) cannot be empty.You need to select / create a pull zone. Specify it here.

    I honestly have no idea what all this stuff is and how to fix it…

  42. stooni says:

    show where there are linked, check the File Rigts!
    —- stooni

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.