Adding a caching plugin to your website is one of the first things to do if you want to speed up your website. Among the best plugins for the job is W3 Total Cache. While the plugin is highly popular with WordPress users, getting through the settings (15+ options in General Settings alone) can scare a beginner. But once you get it right, it can give a boost to site speed. In this post, we’re going to specifically focus on the best W3 Total Cache settings to use on shared WordPress hosting.
W3 Total cache settings – dashboard
Once you’ve installed and activated the plugin, you’re ready to get started.
1. Plugin menu: You’ll see a new item Performance added to the toolbar as well as to the menu on your WordPress dashboard.
Click on Performance in your dashboard sidebar and take a minute to browse through the plugin menu to get an idea of all the various feature areas.
That big list can be scary, but the good thing is you may not have to deal with many items, especially on shared hosting.
2. Compatibility check, empty all caches: The dashboard is the place to clear caching modules and check plugin-server compatibility.
To begin with, click Check Compatibility. The results reveal what the plugin can or cannot do with your current server configuration. Based on the results, you can enable plugin options and see if you need additional server support for some settings.
With shared hosting, you’re unlikely to be able to fix any of the compatibility issues. That’s fine – don’t stress!
Let’s get configuring now…
W3 Total cache settings – General Settings
This section of W3 Total Cache Settings is where you get to enable/disable the plugin’s individual functions. Thereafter, you can refine each function under the respective menu item.
Here’s a quick overview:
Clicking the links will take you directly to that section of General Settings on the same page.
We’ll focus on the W3 Total Cache settings relevant to a shared server setup:
Some settings such as Opcode cache and Fragment cache are applicable only to premium plans. And some others like Reverse Proxy are more relevant to a private server environment or may require additional software (Monitoring).
Preview mode helps you try out changes before going live with them. You can view the changes in a separate browser and they won’t take effect until you deploy them.
It’s a good idea to always use Preview mode first, as functions like minifying can break your site sometimes.
2. Page cache
This section is really the heart of the plugin. Fortunately, it’s easy to set up – just check the Enable box and select Disk: Enhanced for the method.
Minification can sometimes break your site, so you should employ some caution here:
4. Database cache
This one caches the results of common database queries. It can hog server resources and, on a shared server, may actually work against you. It’s best to skip this option.
5. Object Cache
Object cache too can draw heavily on server resources so it’s better to keep it disabled on most shared hosting plans.
6. Browser cache
This tells visitors’ browsers to save a copy of the page and reduces calls to your website. You should definitely Enable this option.
7. Content delivery network
If you’re using a content delivery network (CDN), enable this one. Consult your CDN’s support for how to actually input the information, as the process depends on the exact CDN.
Covers a bunch of settings, the first one enables a Google Page Speed dashboard widget and requires an API key. Enabling it is optional, as you can always test pages manually.
Leave all other settings as the defaults.
Enabling this option adds debugging information at the end of each page. Unless you’re actively using it, keep it disabled. Only the modules that you enable in General Settings are available in this section.
10. Import export
To replicate W3 Total Cache settings on another website, click Download to create a file containing the current active settings. Then upload this file to another site to recreate the same configuration. It can also double as a backup for W3 Total Cache settings.
If you want to start afresh, click the Restore Default Settings button.
W3 Total cache settings – fine-tuning the General Settings
After enabling the different options under the General Settings Tab, you can fine-tune the enabled options by clicking the respective item in the plugin menu.
1. Page cache
General: Configure it according to the screenshot below:
Enable SSL cache only if you’ve implemented SSL on your site.
Aliases: This is not useful to most websites, so skip this one.
Cache preload: enabling it builds a cache automatically even before a visitor requests the page. You’ll need to type in the XML sitemap file of your website. Preload the post cache upon publish events ensures that the cached version is updated each time you publish.
Purge policy: This section specifies which pages are to be purged (AKA, have the cache cleared) when a new post is published or edited.
Advanced: Further, you can exclude some browsers from receiving cached versions, create exceptions and more. Enable the Compatibility mode, and leave the rest as the defaults.
Since we have enabled the auto option for Minify under General settings, there’s not much to do here.
General: The plugin author recommends that you go with the default settings, though you could enable notification for Minify errors.
HTML & XML: Enable all checkboxes, except Don’t minify feeds.
JS And CSS:
Advanced: Here, you can choose to exclude pages and files from minification, set the update interval and when to delete expired cache data (garbage collection). Default settings are fine, but you can change values if you wish.
3. Browser cache
General: Make sure to enable Set Last-Modified Header.
Also, enable gzip compression to compress text files, as well as Prevent caching of objects after settings change so browsers can identify newly cached files.
Leave the rest as the defaults.
You’ll find similar options in the CSS and JS section, the HTML & XML sections and the Media section, and you can leave them as the defaults.
W3 Total Cache settings – other settings
These settings allow you to handle certain types of users differently. You don’t have to do this – but it does give you extra flexibility.
1. User agent groups
You can create a group, say for mobile users, check Enable and select the relevant theme. While creating multiple groups, place the most important group at the top.
To direct a group (say, Android users) to an entirely different site, paste the URL of that website in the Redirect Users To field.
2. Manage referrer groups
This setting directs users coming from different sources such as Google or Bing, to cached webpages specific to that set of users.
3. Cookie groups
Use this setting to create different sets of cookies and assign it to specific groups like subscribers or mobile users to create a unique cache for each.
Enjoy your faster WordPress site
That covers most of the basic settings for W3 Total Cache. After configuring your site like this, you should be set up to enjoy significantly faster page load times.