W3 Total Cache Settings

W3 Total Cache

Today I’m going to take you through all of the W3 Total Cache settings for your WordPress site and explain which ones you should use for optimal performance. After you’ve finished reading this, your pages will load a lot faster resulting in a better browsing experience for your visitors.
 

Installing W3 Total Cache

Before I begin to talk about the various W3 Total Cache settings, I’ll quickly take you through the steps required to install the plugin. If you’ve already installed W3TC, you can skip this part.

Once you’re sure the you aren’t using any other caching plugin, such as WP Super Cache, go to the ‘Plugins’ section in the WordPress Dashboard, click ‘Add New’, then type ‘W3 Total Cache’ into the search box. Click ‘Install Now’, then ‘Activate Plugin’. That’s it, you can go ahead with setting it up now.


 

W3 Total Cache Settings

You will see that a ‘Performance’ button has been added to the left-hand panel of your WordPress dashboard, click it and select ‘General Settings’. Now use the following settings:

- Page Cache: Enable
- Page Cache Method: Disk Enhanced (Disk Enhanced is best for shared hosting)
- Minify: Enable
- Minify Cache Method: Disk
- Database Cache: Disable
- Object Cache: Disable (Enabling database or object caching on shared hosting will decrease performance, only use these if you have a VPS or dedicated server)
- Content Delivery Network: Disable (A CDN such as MaxCDN can give your visitors a faster and more consistent browsing experience, you can set this up in W3 Total Cache settings after you have configured the rest of the options)
- Browser Cache: Enable (This is a great feature that tells the visitor’s browser to load static items from their local machine instead of re-downloading from your server)
 

W3TC Page Cache Settings – General

- Cache Home Page: Enable
- Cache Feeds: Enable
- Cache SSL: Disable (You can enable this for better performance if your site uses SSL)
- Cache URIs: Disable
- Cache 404s: Disable
- Don’t Cache Pages For Logged-in Users: Disable (This is a matter of preference and will depend on the type of site you’re running. Disabling it will make sure that Administrators never see cached pages while they’re logged in)
 

W3TC Page Cache Settings – Cache Preload

Cache Preload displays pre-cached pages to all of your visitors. If you have any problems with it you can simply disable it.

- Automatically Prime The Page Cache: Enable
- Update Internal: 900
- PPI: 7
- Sitemap: Your sitemap will be located at yoursite.com/sitemap.xml
 

Minify Settings

Minify basically combines multiple files on your site into a single file to reduce HTTP requests.
 
W3 Total Cache Minify Settings
 

CSS Minify Settings

- Enable: Enable
- Combine Only: Disable
- Comment Removal: Enable
- Line Break Removal: Enable

Note: If you have problems with styling after changing these, disable all of them except the first one.

Now got to the JS Minify Settings and select the same options as you did for CSS. The rest of the Minify settings can be left on their default values.
 

HTML & XML

- Enable: Enable
- Inline CSS: Enable
- Inline JS: Enable
- Line Break Removal: Enable
Note: If you have a poorly coded theme, you will have problem displaying your site correctly with these enabled. You can test these settings and disable them if you experience any problems.

Skip Database Cache, Object Cache and CDN.
 

W3 Total Cache Settings For Browser Cache

Under ‘General’ change the following…
- Set Expires Header: Enable
- Cache Control Header: Enable
- Set Entity Tag: Disable
- Set W3 Total Cache Header: Enable
- HTTP Compression: Enable
- Prevent Caching Of Objects…: Disable (uncheck)
- Do not process 404 errors: Disable (uncheck)
 
For the CSS, JS, HTML, XML and Media settings, leave everything on the default settings except eTag, disable that for all of them.
That’s it. Those are the best W3 Total Cache settings for WordPress sites on shared hosting. Remember to empty the page cache and you’re good to go!


A 26 year old computer science student, charity fundraiser, and freelancer from the UK. He has a strong passion for all things technology related which he likes to write about in his spare time. Follow Jason on Google+

27 Responses to “W3 Total Cache Settings”

  1. abel says:

    Thax for the guide!
    really helped

  2. otobong says:

    Thanks so much. am using this on my blog right now

  3. Mark says:

    Hi Jason, for some reason enabling W3 total cache on my site deletes all my existing Facebook comments – any idea why this may be happening?

  4. venkat says:

    thanks, max problem solved but still am getting internal server error .. how can i solve….

    • Jason Graham says:

      Hi Venkat,

      Are you seeing an internal server error when W3 Total Cache is disabled? What version of WordPress are you using, and what other plugins?

      Let me know and I’ll try to help!

  5. venkat says:

    am not using latest one i.e 3.4.1.
    please solve the problem.. i instaled w3 Total cache settings..

    • Jason Graham says:

      I’ll help as much as I can, but I need to know if you are seeing an internal server error when W3 Total Cache is disabled? What version of WordPress you are using, and what other plugins.

      Jason

      • venkat says:

        Fatal error: Maximum execution time of 30 seconds exceeded in /home/content/b/h/a/bharatcollege/html/wp-includes/theme.php on line 621

        • Jason Graham says:

          Try this…

          Use an FTP client like FileZilla to log into your server. Navigate to WordPress’ root directory and edit the file called wp-config.php

          At the top of wp-config.php, write:

          set_time_limit(0);

          That’s it.

          If the above does not work, try adding the following to the .htaccess file on the root of you web server:

          php_value max_input_time 200
          php_value post_max_size 20M
          php_value max_execution_time 200
          php_value upload_max_filesize 15M

          Hope that helps!

          • venkat says:

            i tried set_time_limit(0); but not working… again it is time out….

            My domain name : http://www.biet.ac.in
            i found two .htaccess files

            1)In _db_backups folder….

            AuthType Basic
            AuthName “User Backups”
            AuthUserFile /home/content/b/h/a/html/stats/.statspwd
            require valid-user
            Options +Indexes

            2) In Main directory

            # BEGIN WordPress

            RewriteEngine On
            RewriteBase /
            RewriteRule ^index\.php$ – [L]
            RewriteCond %{REQUEST_FILENAME} !-f
            RewriteCond %{REQUEST_FILENAME} !-d
            RewriteRule . /index.php [L]

            # END WordPress

            wre can i add above code…

            plz solve my problem

          • Jason Graham says:

            Hi Venkat,

            Ignore the _db_backups folder. You should add the the following to .htaccess in your main directory (wordpress root / public_html):

            php_value upload_max_filesize 15M
            php_value post_max_size 15M
            php_value max_execution_time 200
            php_value max_input_time 200

            Add it after RewriteEngine On

            That should solve your problem.

            If the above does not work, add the following to the php.ini file located in your main directory:

            max_execution_time = 1000
            max_input_time = 1000
            post_max_size = 100M
            upload_max_filesize = 100M

            If you can’t find php.ini, you can create one in Notepad, just name the file php.in and put the above text inside it.

            Alternatively, you can download the php.ini that I just made for you:

            http://dl.dropbox.com/u/49831054/php.ini

            Upload it to your main directory (WordPress root / public_html)

            Let me know if that works!

            Jason

  6. venkat says:

    Hi,,
    Thanks for ur reply…

    But still am facing same problem Internal server Error.
    Sometimes it is login and sometimes not login…..

    pls solve my problem….

    • Jason Graham says:

      Other than what I’ve mentioned, the only thing I could suggest is to remove WP Total Cache, update WordPress, then install WPTC again.

      You can remove WPTC without logging into the dashboard. To do so, use your FTP client and navigate to wp-content/plugins and delete the WPTC directory.

      After you have updated WordPress, you can try WPTC again.

      If the error persists after that, you should contact your host.

      Good luck!

    • Jason Graham says:

      Hi again,

      I spoke to a friend today and he said that sometimes server administrators configure their servers in a way that prevents some caching plugins from working properly. So your best bet would be to remove the WP Total Cache plugin, then contact your host to install it for you. Again, it would also be a good idea to update WordPress. The version you have at the moment is very old and does have some vulnerabilities that could be exploited.
      WP Super Cache is another good alternative to WPTC that you may want to consider.
      All the best!

  7. Jason,

    Thank you so much for this WC3 Total Cache guide. I have been spending hours tweaking on my own with mixed results. But now, for the first time, I can tell a huge difference in load speed. Here are my Web Page Performance Test results:

    Page Speed 95/100
    First Byte Time: B
    Keep-alive Enabled: A
    Compress Text: A
    Compress Images: B
    Cache static content: D

    Would using CloudFlare increase my cache static content score? Thanks.

    • Jason Graham says:

      Glad to have helped.

      It would depend largely on you web-host. CloudFlare has a detrimental impact on performance for me because my host, HostGator, serves requests very quickly. I can only suggest that you experiment yourself.

  8. Paul Facey says:

    Hey Jason, thanks for sharing.

    I will experiment with this and see how it works out for me.

    Also, I noticed your blog loads pretty fast, (than the usual blogs) and I was wondering who do you use for your webhost, or if you’re running this site on S3 or any other cloud platform.

    All the best,
    Paul Facey

    • Jason Graham says:

      Hi Paul, no problem at all.

      I settled with HostGator in Feburary after trying a few others, and I couldn’t be happier. The performance has been consistently brilliant with virtually zero down time.

      S3 actually increased the load time from nearly all locations.

      Give it try if you haven’t already!

      • Paul Facey says:

        Cool. I use Hostgator myself too.

        I also heard about amazon EC2 service that allows us to install wordpress on their super fast servers but I hear it requires some technical know-how.

        Have you tried it?

        I ran a demo and it worked well and super fast, except that I could get to setup my CNAME to point to their S3 link for the website. Plus, whenever I change the permalink to /%postname%/ or anything else apart from the default setting, it broke the site.

        I might give it a try some other time.

        Cheers.
        Paul Facey

        • Jason Graham says:

          Sorry for the late reply Paul.

          I’ve also used Amazon’s E2C but I didn’t notice any improvement, although it may not have been configured properly. I’m very happy with HG and W3 Total Cache so I haven’t really had any need to test further. I would be really interested to know if you’ve had a chance to try it again? Did you manage to use canonical URLs with it?

          Cheers.
          Jason

  9. pugazhenthi says:

    Hi Jason,

    Thanks for sharing this excellent steps.

    Now my site is load very well.

  10. kane says:

    thnx for the real help…

Leave a Reply

© 2013 TECH OD. All rights reserved. - Privacy Policy