Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Cup
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

How to Install and Setup W3 Total Cache for Beginners

Do you want to install and set up W3 Total Cache on your WordPress website?

W3 Total Cache is a popular WordPress caching plugin that helps you to improve your website speed and performance. Caching plugins can help retain users and lower bounce rates, which can help SEO and increase conversions.

In this beginner’s guide, we’ll show you how to easily install and set up W3 Total Cache on your WordPress website.

W3 Total Cache installation and setup guide for WordPress beginners

Editor’s Note: We don’t use W3 Total Cache on our website anymore and have switched to WP Rocket which is a premium caching plugin. W3 Total Cache is still a fine solution that works well.

What is W3 Total Cache?

W3 Total Cache is one of the best WordPress caching plugins that allows you to easily improve WordPress performance and speed.

By default, WordPress uses PHP to dynamically generate each page on your website when it is requested by a user.

PHP is a server-side programming language. This means each user request increases the load on your server. This affects your website’s performance, user experience, and SEO.

WordPress caching plugins help you reduce this by skipping PHP and serving a cached copy of your webpage.

How caching works

It also allows you to easily connect your website to a CDN (content delivery network) to further improve your website performance.

Installing W3 Total Cache in WordPress

Before you install the W3 Total Cache plugin in WordPress, you’ll need to make sure that you deactivate any other caching plugin on your website. This will help you save server resources and prevent any plugin conflicts.

After that, you can go ahead and install and activate the W3 Total Cache plugin. For more details, see our step-by-step guide on how to install a WordPress plugin.

Upon activation, W3 Total Cache will add a new menu item labeled Performance to your WordPress admin sidebar. Clicking on it will launch the plugin’s setup wizard.

W3 Total Cache set up

Simply click on the Next button to continue.

First, you will be asked to turn on Page Cache. Click on the Test Page Cache button to continue.

Configure page cache

W3 Total Cache will show you different storage engine options. You need to choose one that saves you the most time. Usually, it will be the ‘Disk: Enhanced’ option for most shared hosting platforms.

Click on the Next button to continue.

Now, you will be given the option to Test Database Cache. We recommend choosing None. For most small to medium-sized websites your MySQL server will be able to fetch data more quickly than the Database cache.

Database cache

Click on the Next button to move on to the next step.

This will bring you to the Object Cache section. Object Caching allows W3 Total Cache to store database queries for dynamic pages and reuse them to improve performance.

Object cache in W3 Total Cache

If the test result shows barely a few milliseconds difference then you can choose None.

Click on the next button to continue.

After that, click on the Test Browser Cache button and then select the ‘Enabled’ option under the test results.

Browser cache

This option requests the user’s browser to store a copy of the web page for a limited time. Loading a page from a browser cache is much faster than loading it from your web server’s cache.

Click on the next button to move on to the next step.

Lastly, the setup wizard will ask you to enable lazy loading for images.

Now, WordPress comes with built-in lazy loading for images. However, some older browsers may not have support for that feature.

W3 Total Cache uses JavaScript to add lazy loading for images, which can be even faster and more efficient.

Enable Lazy Loading

After that, click on the Next button to finish the setup wizard and view W3 Total Cache dashboard.

Advanced Caching Options in W3 Total Cache

The basic settings would work for most websites. However, there are many advanced options that you can configure to further improve performance.

Let’s take a look at the most important ones.

Minifying JavaScript and CSS in W3 Total Cache

The term ‘minify’ is used to describe a method that makes your website file sizes smaller. It does this by removing white spaces, lines, and unnecessary characters from the source code.

Note: Minifying JS and CSS files can potentially break your website. If you turn it on and your website doesn’t look right, then simply disable these options.

W3 Total Cache allows you to easily minify JavaScript, CSS, and HTML source code as well. However, we recommend only minifying JavaScript and CSS files.

Simply head over to Performance » Minify page and scroll down to the JS section.

Enable JS minify in W3 Total Cache

Check the box next to ‘JS minify settings’ to enable it.

Now, scroll down to the CSS section and enable CSS minify settings the same way.

Enable CSS minify

Don’t forget to click on the Save All Settings button to store your settings.

For alternate methods, see our guide on how to minify JavaScript and CSS files in WordPress.

Enable CDN Support in W3 Total Cache

CDNs or content delivery networks help you further improve your website performance by serving static files like images, CSS, and JavaScript from a global network of servers.

This reduces the load on your WordPress hosting server and improves page load speed.

W3 Total Cache comes with built-in support for various CDN platforms.

We recommend using Bunny.net which is the best CDN solution on the market. This is what we use for our OptinMonster website.

First, you need to signup for a Bunny.net account. After signup, you need to create a Pull Zone for your website.

Bunny CDN dashboard

A pull zone adds a hostname to Bunny.net CDN. This hostname is then used to serve static files for your website.

Add a name for your pull zone and then provide your website’s domain name.

Create pullzone

After adding the pullzone, you need to visit the Performance » General Settings page.

Then, just scroll down to the CDN section.

Enable CDN

Check the Enable box next to the CDN option and choose Generic Mirror next to the CDN Type option.

Don’t forget to click on the Save All Changes button to store your settings.

Next, you need to visit the Performance » CDN page and scroll down to the Configuration: Objects section.

Add CDN hostname

From here, you need to add the hostname you created earlier for your pullzone and click on the test mirror button.

W3 Total Cache will check the availability of your hostname and will show the Test Passed message when it’s successful.

You can now click on the Save All Changes button to store your settings.

W3 Total Cache will now start serving your static resources from CDN server.

W3 Total Cache also works well with Cloudflare free CDN. Alternately, you can also use it with Sucuri which is the best website firewall service with built-in CDN service.

Troubleshooting W3 Total Cache Issues

Once you have configured W3 Total Cache properly, it should work seamlessly in the background to improve WordPress speed and boost performance.

Occasionally, you may come across issues where you don’t see changes you made to your website right away, or a plugin may not be working properly.

The most common reason for those issues is that you are probably seeing an old cached version of your website.

This can be easily fixed by clearing the cache in WordPress.

Simply click on the Performance menu at the top and then select Purge All Caches option. W3 Total Cache will clear all cached content on your website.

Clear all cache in W3 Total Cache

If you are still seeing the old version of your website, then try clearing your browser cache too.

We hope this article helped you install and set up W3 Total Cache in WordPress. You may also want to see our complete WordPress security guide for beginners to strengthen your website security, or our expert picks of the best WordPress hosting services to speed up your website even more.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us. Here's our editorial process.

Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit - a collection of WordPress related products and resources that every professional should have!

Reader Interactions

163 CommentsLeave a Reply

  1. Syed Balkhi

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. Rabia

    Thanks valuable information.

    • WPBeginner Support

      You’re welcome :)

      Admin

  3. Jiří Vaněk

    I would recommend everyone to make a note of the changes you have made, especially. Issues on the website may not manifest immediately. For instance, it happened to me that after a week, WordPress started behaving strangely, and it was happening randomly. It took me quite a while to find the problem in the cache plugin and incorrect settings. If I had documented the changes I made, I would have found the problem more easily. It’s a recommendation for everyone.

  4. Roin

    Hello,

    I’ve a question:

    Does a free version slow the website ? My opinion is that a free version of this plugin makes website slow.. how do you think?

    • WPBeginner Support

      The free version of plugins will not slow down your site, poorly coded plugins can slow down your site.

      Admin

  5. Abu Allaah

    Thanks for the valuable tips,

    I would like to ask if it’s possible to update the article with the latest version of the plugin.

    Thanks in advance

    • WPBeginner Support

      We will look into updating the article as soon as we are able :)

      Admin

  6. Balu

    I enabled Minify settings in W3 Total cache plugin and also installed cloudflare extension in w3 total cache plugin.
    Should I enable minify settings in Cloudflare extension also?

    • WPBeginner Support

      You would want to only use one or the other, if your W3 Total cache minification is working well then stay with that for the moment :)

      Admin

  7. Prajyot Kumbharjuvekar

    Do I still need to install a caching plugin if I use CLOUDFLARE CDN

    • WPBeginner Support

      It is not required but it is recommended to use a caching plugin with your CDN

      Admin

  8. Duryab

    This post is much outdated now, please update this post to the latest W3 total cache plugin.

    Thanks.

    • WPBeginner Support

      Thank you for letting us know about this post being outdated, we will update this article as we are able :)

      Admin

  9. Tom Lloyd

    Thanks for the great article! I really benefitted from it and have a better performance now 1/4 load time. One thing you should mention is in the Browser Page under Performance tab there is a box at the bottom that says Rewrite URL. Don’t check that it ruined my pages. All links were alterred but I took it off and it’s ok.

    • Gavin

      Thanks for your very easy to follow tutorial (with screenshots) on W3 Total Cache. I noticed an immediate difference in load time of the site.

  10. Bikramjit

    Hi, As per your recommendation, I have decided to go for MaxCDN, Is there any new update about CDN? Going to the MaxCDN site, there are different service including Content Delivery Network, Edge Delivery and other. Can your recommend me which service I have to select initially? I have new blog with no affiliate link till now and not planning for the next six month. And I am planning to apply Google adsense in the near future.Presently I installed WP Super Cache.
    Do I need to switch W3 Total Cache to configure with MaxCDN? if I can configure MaxCDN with WP Super Cache, do you have any guideline?

  11. HumbleHuman

    Hey:)

    Thanks for those detailed instructions and I must say that you helped me much in setting up W3TC for my website..

    I have a small issue with W3TC.. It is not purging my feed cache even though I have enabled this in the Purge Policy..

    Will you help me how to solve this issue?

    Thanks in Advance

  12. Brandon

    After following this guide, I get the error: “Error: Empty hostname / CNAME list.” I have filled the “Replace site’s hostname with:” with all my cdn.* fields. Has anyone ran into this issue?

  13. Vijay Prajapati

    I am Using W3 Total cache plugin for WordPress. My post has one table which updates every minute/hour. But as I do caching, the server does not serves latest version, instead it displays cached copy to the visitor. How can I purge cache every 30 minutes automatically so that it shows latest version of the post at after every 30 minutes?
    I have already tried inserting this code in functions.php file but its not purging cache every 1h, instead it dies 2-3h later.

    function w3_flush_cache( ) {
    $w3_plugin_totalcache->flush_all();
    }

    // Schedule Cron Job Event

    function w3tc_cache_flush() {
    if ( ! wp_next_scheduled( ‘w3_flush_cache’ ) ) {
    wp_schedule_event( current_time( ‘timestamp’ ), ‘hourly’, ‘w3_flush_cache’ );
    }
    }

  14. Anna

    Thanks for such an easy to follow article. I broke my website yesterday using instructions from another blog. I should have come here first!!

    I am a bit surprised by my results though. I did a Pingdom and GT Metrics test before I made all these changes and my page load time was:
    Pingdom: 8.91 secs and GT Metrix: 5.3 secs

    After I made all the changes I re-ran the tests:
    Pingdom: 9.51 secs and GT Metrix: 9.9 secs

    I thought my load times were meant to get much better – not worse!!?? What have I done wrong?

    • WPBeginner Support

      Hi Anna,

      Allow the plugin to generate cache and recheck your scores. If that doesn’t help try to review your cache settings to make sure everything is setup properly. Alternately, you can try WP Super Cache and see if it helps.

      Admin

  15. Roman

    Thank you for so great content.
    Should I enable “Page cache” option in the process of development of site or only at when I launch it?
    For me it is convenient to do this right now, but I think maybe during development it is not good as I visiting thousand times to check the progress.

    • WPBeginner Support

      Hi Roman,

      Yes, you are right. You can set up the plugin later once your website is live.

      Admin

  16. Jessica Braboy

    Hi! Trying to install the W3 Total Cache Plug In, and while it says it is compatible with my version of WordPress, it says that the plug in is unavailable and says “Not allowed on our system due to performance, security or compatibility concerns. Please contact support with any questions.”
    First of all… do you know why this is no longer working? And, do you have an alternative cache plug in that you recommend? Thank you!

    • WPBeginner Support

      Hi Jessica,

      This means that your WordPress hosting company doesn’t allow the plugin. Most probably because they have their own caching solution integrated into your hosting account which doesn’t work well with W3 total Cache. Please contact your hosting provider for more details.

      Admin

  17. Andy Sellers

    Hi, I need some help please.
    I’ve followed the instructions to serve my static files through CDN (and they’re very clear, thank you) and have found the process straightforward so far- but when I log in to my site the URL still starts with ‘www.’ and not ‘cdn’ so I guess cdn is not operational yet.
    One thing I notice is that in the MAXcdn account page there is no option to ‘Update’ the Custom Domain settings as mentioned in the instructions – is this OK? I assume it now updates automatically?
    But my main problem is that, assuming I now have to do this, I don’t know how to specify the static files in the custom files list in the custom setting of W3Total Cache. Help please. How should I fill in this Advanced panel – it’s now getting a bit too techie for me? Thank you.

    • WPBeginner Support

      Hi Andy,

      You will login to your WordPress site using the normal URL. CDN only serves static files via their network not the whole website.

      MaxCDN settings may have changed, but you would still need to setup your domain. Please contact their support and they will be able to guide you.

      Admin

  18. sazia kazia

    Hi Very helpful and useful article. I set w3 total cache as per above instructions and could see it improved my website speed in good level. I ‘ll use MaxCDN instructions …Thank you so much

  19. Amit Jain

    Hello Team! I am following your blog since long now and trust have learnt a lot. Thanks.

    I need a little bit of help – Mine is a startup site, but have started with Cloud VPS Server with Data Centre located in Mumbai, India. 2.80*4 CPU and 8GB Ram is the part of Server Configuration. For better Site Security and Performance what should i use – Cloudflare (If cloudflare then free or paid plan) or Sucuri, W3Total Cache, WP Super Cache, Varnish Cache or Some other plugin/software.

Leave A Reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.