How to Install and Setup W3 Total Cache (Best Guide)

W3 Total Cache is currently the best WordPress plugin for cache-based, performance optimization. W3 Total Cache improves the overall speed of your site by caching multiple elements on your pages which improves the overall responsiveness of your webserver.

What is Caching?

Caching is simply the storage of website data for later usage by your clients. Caching can be accomplished via multiple methods, with W3TC (W3 Total Cache) being one of the primary means to achieve this task. W3 Total Cache is rated as one of the best WordPress plugins for performance optimization on Virtual, Dedicated and Managed servers and, is used by millions of sites to increase their overall site performance.

The W3TC plugin site itself lists multiple other benefits of this software as well, and I quote:

*Improvements in search engine result page rankings, especially for mobile-friendly websites and sites that use SSL

*At least 10x improvement in overall site performance (Grade A in WebPagetest or significant Google Page Speed improvements) when fully configured

*Improved conversion rates and “site performance” which affect your site’s rank on Google.com

*“Instant” repeat page views: browser caching

*Optimized progressive render: pages start rendering quickly and can be interacted with more quickly

*Reduced page load time: increased visitor time on site; visitors view more pages

*Improved web server performance; sustain high traffic periods

*Up to 80% bandwidth savings via minify and HTTP compression of HTML, CSS, JavaScript and feeds

Requirements:

Before you start the install process, we suggest that you document the performance of your sites before installing W3TC. To verify the website speed increases, you can use websites like Google’s Page SpeedStatusCake,  DareboostPingdom, Pagespeed Checker or GTMetrix to get a better overall perspective of the before and after benefits of W3TC.

Also, we suggest deactivating and uninstalling other caching plugins you may have used before installation, as other caching plugins changes may have a negative effect on W3TC. Other plugins will usually have some customizations in place that have modified the rewrite rules for fancy permalinks, or they possibly may have modified your browser caching rules. We only mention this as W3TC will automate the management of all caching best practices. Also please ensure the wp-content/ and wp-content/uploads/ folders have a temporary 777 permissions set before moving forward. You can make this change in the terminal by using the commands:

[email protected] [~]# chmod 777 /home/user/public_html/wp-content/

and

[email protected] [~]# chmod 777 /home/user/public_html/wp-content/uploads/

or, you can make this change using your web hosting control panel or logging in the server via your SFTP / SSH account and making that change.

Read our previous article: How To Fix Slow WordPress Hosting On GoDaddy

Install Plugin W3 Total Cache

Log in to your WordPress site via your browser. In your left-hand navigation menu, go to Plugins >> Add New. Then, in the top right corner, type into your Keyword search bar W3 Total Cache

W3 Total Cache

This will bring up the search results for the W3 Total Cache plugin as seen below.

Next, click the “Install Now” button

W3 Total Cache

After the plugin installs, click the Activate button

Note:
When you click Activate, page caching will automatically be running in basic mode until you modify the settings within the plugin and click save.

Now, let’s reset the permissions of the /wp-content/ and /wp-content/uploads/ folders back to 755. In your terminal run:

[email protected] [~]# chmod 755 /home/user/public_html/wp-content/

and

[email protected] [~]# chmod 755 /home/user/public_html/wp-content/uploads/

After we have activated the plugin and reset those permissions, we’ll see Performance added as a new top-level selection on the left side navigation menu. Click on the Performance link, and you’ll be taken to the W3TC Dashboard where you will see a full list of the W3TC menu items that include the following pages:

  • Dashboard
  • General Settings
  • Page Cache
  • Minify
  • Database Cache
  • Object Cache
  • Browser Cache
  • User Agent Groups
  • Referrer Groups
  • CDN
  • Monitoring
  • Extensions
  • FAQ
  • Support
  • Install
  • About

To begin, let’s click on the Check Compatibility button:

Jasaseo.be server statistics:

cpanel

W3 Total Cache Compatibility:

W3 Total Cache

Note: If you use shared hosting you have limited features, here we use a dedicated server so we can add premium features

General Settings W3 Total Cache

On the left side navigation menu, click on Performance >> General Settings to start the configuration. This is where we can enable all of the W3TC features and settings. Luckily, we will not need every setting enabled so we’re simply going to be reviewing all of the options from this window.

Page Cache

In the next section under Page Cache, we can enable Disk Enhanced mode, which is a good starting point. Click the Enable textbox, and then click the Save all settings button. Under the Disk: Enhanced drop-down menu, multiple other settings can be utilized to fit your specific needs.

W3 Total Cache

Note: If you use shared hosting, use memcache (you cannot enable opcache feature) memcache option can be used with shared hosting, but if memcache feature is not available contact your hosting provider

Minify

Minification compresses and combines many different file types, including JavaScript and CSS on your website. Minify also shrinks your website’s code, without losing any of its functionality. You will want to use minify to improved page load times. We suggest using the Auto Minify mode.

W3 Total Cache

Opcode Cache

Opcode cache is primarily used to cache PHP code. Because WordPress is coded in PHP, multiple sections of WordPress are regularly utilized when serving up a webpage. Opcode cache can cache this site code for a definite increase in performance and speed.

W3 Total Cache

Database Cache

This caching option transfers work from a running database to the CPU/RAM and is not recommended if you are on a shared server. Unless you are utilizing a sizable server (like a virtual, dedicated or managed server option) with a substantial amount of RAM, leave this option unchecked.

W3 Total Cache

Object Cache

The Object Cache option stores the results of complicated database queries to reduce the server’s load. For example, say a user made a simple search on your site. That search performs a full search on your entire WordPress database. Object caching stores that info for future use so the results can be provided more quickly next time. You can try this option, but I would only leave it enabled if you see an increase in backend speed.

W3 Total Cache

Browser Cache

This option instructs the client’s browser to retain a local copy of the visited webpages (on their browser) when they visit your site. This reduces the overall number of calls to your website. Browser Caching speeds up your site by enabling the sites static resources to be stored in your visitors’ browsers, thereby eliminating the need for the server to continually re-supply static content over and over again to repeat visitors. You definitely need to Enable this option.

W3 Total Cache

CDN

If you use a CDN service like Akamai, Cloudflare or MaxCDN, you will want to enable this option. A CDN (Content Delivery Network) is a service that stores static website content (like images, HTML files, javascript files, stylesheets, and videos) on geographically diverse servers around the world.

The client is then served up the stored content by the CDN, which reduces the load on your server. The response times for the client requests are also significantly reduced since the server that is closest to the client is used to serve up your stored content.

If you enable this option, you will want to consult with your specific CDN provider’s support pages on how to input the relevant information into W3 Total Cache. The exact process will vary depending on the CDN being used.

W3 Total Cache

Reverse Proxy

Reverse proxies are an advanced concept that generally requires a significant configuration investment. Reverse proxies operate like this; If your server receives a large number of requests at the same time, it can get bogged down fetching the requested data and trying to serve up new requests.

A reverse proxy server can assist in situations like this by acting as a middleman, as the proxy server will receive the redirected requests instead of your webserver. The proxy server can then access the cache itself and serve up the requested content to the client.

This allows for the actual server to perform other tasks. There are multiple reverse proxy software titles that handle this type of duty. NginX, Varnish, and Squid can assist in a large scale operation, but its setup and configuration are best left to systems admins and developers.

W3 Total Cache

Monitoring

W3TC integrates nicely with New Relic which functions as a performance monitoring system. Because of New relic’s ability to work with multiple programming languages and server technologies (one of which is PHP), it makes for a significant way to further optimize WordPress.

New Relic’s PHP monitoring daemon tracks performance at a deeper level. This allows for the monitoring and diagnosis of unexpected server problems that can be related to your server’s overall performance. Again, the setup and configuration of New Relic are best left to systems admins and developers.

W3 Total Cache

Fragment Cache

A modern advanced website has multiple sections, parts, and elements that are specifically designed to interact differently with each client. These components can be as simple as a social media icon at the bottom of the page all the way up to a shopping cart.

Many times these elements are designed to be personalized to each user. Because these features are dynamic in nature, trying to provide caching for these objects can be challenging at best. Fragment caching bridges that gap between no caching at all and full caching.

W3 Total Cache

Licensing

If you have purchased the Pro version of W3TC, the license key is added here.

W3 Total Cache

Cloudflare Settings

Now login to Cloudflare and go to your speed settingsEnable all auto minify settings, Rocket LoaderRailgunaccelerated mobile links, and just copy the same settings I use…

W3 Total Cache

Once you’re done configuring W3 Total Cache, and Cloudflare, purge all caches in W3 Total Cache (below). If you don’t see this, there may be an ’empty all caches’ option in the dashboard tab. Then retest your site in Pingdom. It can take up to 24 hours for Cloudflare nameservers to propagate, but you should receive a confirmation email when it’s complete.

W3 Total Cache Issues

Website formatting issues – disable the “minify” option in the General Settings tab.

Slow WordPress dashboard – disable “object cache” in the W3TC General Settings tab, set page rules in Cloudflare, then disable unused settings in WordPress core using the WP Disable plugin.

Slower load times than before – disable “object cache” or wait 72 hours for propagation.

Crashed website: open wp-config and delete these lines:

/** Enable W3 Total Cache */
define('WP_CACHE', true); // Added by W3 Total Cache

Open .htaccess and remove all lines between and including:

# BEGIN W3TC ...
# END W3TC

Then delete: advanced-cache.php, objectcache.php, and db.php from wp-content. Also delete the w3-total-cache folder in wp-content/plugins.

Tips:

Serve Scaled Images

resize large images to be smaller. Pingdom tells you which images need this but only for the single page you run it through. Start with images that appear on multiple pages (logo, sidebar, footer images) since fixing these reduces load times for multiple pages. Pingdom tells you the correct dimensions of each image, but it’s a good idea to have a cheat sheet of your slider, widget, and other areas so you can resize your images before uploading.

Optimize Images (Lossless Compression)

Imagify is best for this. Sign up and grab an API key, then install their plugin where you can enter the API. Then go to Media → Bulk Optimization and start losslessly compressing all images on your site. There is a free monthly quota of 25MB per month (or $4.95 for 1GB) but it’s much better than other free plugins. From my experience you need to use the “aggressive” setting to fix these items in Pingdom.

Specify Image Dimensions

Means you need to specify a width/height in the image’s HTML or CSS. You will need to locate the image (using Pingdom), find it on your WordPress site, then add a width/height which Pingdom will tell you. Usually for images outside your visual editor.

AMP Pages

Stands for accelerated mobile pages, is a project by Google, and adds a nice “AMP” stamp to your mobile search results. I provided instructions below…

Faqs W3 Total Cache

How does w3 Total Cache work?

Minify: W3 Total Cache can 'minify' HTML, JavaScript and CSS files. This removes all whitespces in the files, making them smaller. This setting needs to be reviewed when you set up the plugin. Database Caching: W3 Total Cache caches database queries, speeding up the site significantly.

What is w3 Total Cache plugin?

W3 Total Cache. The Most Complete WordPress Performance Framework. 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.

What is a caching plugin?

A caching plugin generates static HTML pages of your website and saves it on your server. Each time a user tries to access your website, your caching plugin serves up the lighter HTML page instead of processing the comparatively heavier WordPress PHP scripts.

ABOUT US

Search engine optimization (SEO) or Jasa SEO is the process of helping your customers connect with your business online. Our team uses modern SEO services, backed by the best digital practices, to increase your traffic & rankings for vetted keywords and long-tail phrases that drive business to your site

FREE SEO CHECKER

Get FREE SEO report by 100+ parameters with the best SEO checker

Subscribe to our newsletter!