W3 Total Cache: setup guide

0
77
WordPress caching: W3 Total Cache setup guide

First of all we need to talk a little about W3 Total Cache ,it 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.

A web cache (or HTTP cache) is an information technology for the temporary storage (caching) of web documents, such as HTML pages and images, to reduce bandwidth usage, server load, and perceived lag. A web cache system stores copies of documents passing through it; subsequent requests may be satisfied from the cache if certain conditions are met. A web cache system can refer either to an appliance, or to a computer program.

Install W3 Total Cache.

To install W3 total cache plugin follow below steps:

  1. login to your WordPress dashboard.
  2. select plugins >> add new from admin menu.
  3. in search box enter “w3 total cache” and install it.
  4. or download it from : WordPress.org

Basic W3 Total Cache settings :

After installing and activating the plugin you will see performance tab added in your dashboard menu and in the top admin menu bar. Now I will tell you what settings you should enable and explain benefits of each with recommendation !.

General Settings

  • Enable Page Cache and select Disk: Enhanced method.
  • Enable Minify set mode to manual and make Disk minify cache method. In some cases minify break the theme so just disable it in that case.
  • Disable database cache, enabling database caching is not recommended because in some case it breaks functionality of some plugins.
  • Enable object cache, it increases performance of dynamic websites. Object cache method should be Disk.
  • Enable browser cache.
  • Enable CDN, it is highly recommended. It decreases load on server and increases uptime.

Advanced W3 Total Cache settings :

Now we are going to configure more advance settings, follow the below instructions:

Page Cache

Access page cache setting by going to Performance >> Page Cache

Page Cache- General

  • Tick cache front page.
  • Tick cache feeds.
  • Tick cache SSL (https) requests.
  • Untick cache URIs with query string variables.
  • Tick cache 404 (not found) pages.
  • Tick cache requests only for www.howlthemes.com site address
  • Untick don’t cache pages for logged in users.
  • Tick don’t cache pages for following user roles

Page Cache- Cache Preload

  • Tick automatically prime the page cache.
  • Change update interval to 11000 seconds.
  • Enter your sitemap URL.
  • Tick preload the post cache upon publish events.

Browser Cache

Access browser cache setting by going to Performance >> Browser Cache

Browser Cache- General

  • Tick Set Last-Modified header.
  • Tick Set expires header.
  • Tick Set cache control header.
  • Tick Set entity tag (eTag).
  • Tick Set W3 Total Cache header.
  • Tick Enable HTTP (gzip) compression.
  • Untick Prevent caching of objects after settings change.
  • Untick Don’t set cookies for static files.
  • Untick Do not process 404 errors for static objects with WordPress.

Browser Cache- CSS & JS

  • Tick Set Last-Modified header.
  • Tick Set expires header.
  • Set Expires header lifetime: 31536000 seconds.
  • Tick Set cache control header.
  • Tick Set entity tag (ETag).
  • Tick Set W3 Total Cache header.
  • Tick Enable HTTP (gzip) compression.
  • Untick Prevent caching of objects after settings change.
  • Untick Disable cookies for static files.

Browser Cache- HTML & XML

  • Tick Set Last-Modified header.
  • Tick Set expires header.
  • Set Expires header lifetime: 3600 seconds.
  • Tick Set cache control header.
  • Tick Set entity tag (ETag).
  • Tick Set W3 Total Cache header.
  • Tick Enable HTTP (gzip) compression.

Browser Cache- Media & Other Files

  • Tick Set Last-Modified header.
  • Tick Set expires header.
  • Set Expires header lifetime: 31536000 seconds.
  • Tick Set cache control header.
  • Tick Set entity tag (ETag).
  • Tick Set W3 Total Cache header.
  • Tick Enable HTTP (gzip) compression.
  • Untick Prevent caching of objects after settings change.
  • Untick Disable cookies for static files.

This settings will fix Leverage browser caching error which site gets in Google pagespeed insights.

Minify

Access minify setting by going to Performance >> Minify

Minify- General

  • Tick rewrite URL structure.

Minify- HTML & XML

  • Enable HTML minify settings.
  • Tick Inline CSS minification.
  • Tick Inline JS minification.
  • Tick Hide comments.

Minify- JS

  • Enable JS minify settings.

Minify- CSS

  • Enable CSS minify settings.
  • Tick Remove unnecessary backslashes.

That’s it. This settings will boost your WordPress site load speed, and if you get any error or trouble when using W3 total Cache plugin put your question by commenting on this post.

What you think ?