W3 Total Cache can be one of the most reliable plugins if you want to optimize your website with the free cache plugins. Undoubtedly, it is one of the best caching tools for a WordPress website. You can use this great plugin to make your site faster. That’s why W3 Total Cache Settings are so much important.
It’s a free cache plugin, but the options and settings can be overwhelming of this plugin. If you can use the right settings for the tool, it will be more than just a caching mechanism. Statistics showed that you could speed up your WordPress site five times better than usual by using W3 total cache.
You may need to spend about 5 minutes on applying the W3 Total Cache Settings. We will explain to you how you can speed up your WordPress website using W3 total cache plugin without wasting time. We will apply the settings basically in two sections.
At first, we will enable the general settings of W3 total cache, and then we will configure the advanced settings. A faster website makes your visitors happy as well as search engines will count your site as a special one. All in all, faster WP websites ultimately increase your site’s traffic.
First of all, let’s get some idea about this cache plugin that is called W3 Total Cache.
What Is W3 Total Cache Plugin?
W3 Total Cache plugin is a kind of framework which can optimize the overall performance of your WordPress site. This essential plugin helps to improve user experience and the page load speed.
Also, it helps to get the most out of caching storing data from the previous sessions that we can re-use for the following sessions. In this process, it reduces the server load time, which helps to load up the contents faster.
W3 Total Cache Settings and Configuration:
It’s not so easy to install and set up this WP cache plugin because there are tons of options to configure. But don’t worry, we are here to assist you. We will provide a step-by-step guide to make it as simple and understandable as possible. So you should conveniently follow the steps that we provide.
Step 1. Install
W3 Total Cache is a free WP plugin that you can install. You will get it from the dashboard panel through Plugins. Then click on the Add New option and search for W3 Total Cache. After that, you should install it and also make sure you activate it. Now check out the Performance tab.
Step 2. Check the compatibility
You can select the Dashboard, once you are on the Performance tab. You can operate a compatibility check and clear the caches here. In this step, you need to click on the Compatibility Check button to run a test on the server configuration that you are currently running.
You will know what options can be enabled based on these results. Additionally, you will get the knowledge of what kind of server you are now operating. You may not be able to fix all the problems if your site is running on the shared hosting.
Step 3. General settings
The first job you need to do is to configure the General Settings option. It lets you approve the features what you will set later on. W3 Total Cache provides all of these features automatically. You have to turn off it as you do now need all of those.
If you want to test all the change before deploying you also can enable the Preview Mode. It could be a good idea, but you don’t need this feature if you follow our post word by word. We will recommend not to enable this feature because you will see all the options in the General Settings.
Step 4. Page cache
To transfer the files faster, Page Cache is very much significant. This feature produces a cache of your pages in the storage disk and moves them more quickly without using your hosting RAM power. You should enable this feature because this is the thing that you are here. You always need the Page Cache feature to achieve the better performance of your website.
You have to choose the Disk: Enhanced menu as the “Page Cache Method” after enabling the Page Cache feature. You don’t need to worry about it because it should be selected by default. You may notice that the plugin developer recommends the basic settings and we also recommend using “Compatibility mode” if you go to the Install tab.
General: – You should enable the items mentioned below in the general section.
- Cache front page.
- Cache feeds.
- Cache SSL (https) requests– Enable this only if you are using SSL.
- Cache URIs with query string variables.
- Cache 404 (not found) pages.
- Don’t cache pages for logged in users.
Aliases: – You can leave the “Aliases” settings disabled as it is already placed.
Cache Preload: – This feature will automatically build a cache even before a user’s request. You can apply these following cache preload settings.
- Enable “Automatically prime the page cache” option.
- Update interval time 900 seconds.
- Pages per interval: Give it 10.
- Sitemap URL: Provide your sitemap URL.
- Enable the “Preload the post cache upon publishing events” option.
Purge Policy: Page Cache: – This option configures which pages cache will be cleared whenever an old post is edited, or a post is published. You should select the pages that suit your need.
REST API: – Click on the “Don’t cache” option because you do not have to cache the Rest API for some apparent reasons. Apply this REST API setting and choose the “Save all settings” option.
Advanced: – If you have the Memcached installed on your web server, then you can only enable the Memcached hostname and persistent connection settings. Otherwise, you should just leave it. All you need to be concerned in this feature is about the Compatibility mode, enable it, and leave other options as already they are.
Step 5. Minify
If you use the Cloudflare, make sure that the Minify feature is turned off in the “General Settings” tab. The recommended settings by plugin developers for the minify, database cache, and object cache are preset.
It will improve the load time of your website. For this reason, minification is so essential, even Google recommends it. So you should enable this Minify feature and apply these following settings for Minify.
- Enable minify.
- Leave the Minify mode to Auto.
- Select the Disk as the Minify Cache Method.
- Leave the HTML Minifier to default.
- Leave the JS Minifier to JSMin (default).
- Leave the CSS Minifier to default.
You may notice that all the options which are needed are already checked by default in the Minify setting. You may double check or move on to the other options under this setting.
You can check your web server compatibility from the “Dashboard” of W3 total cache. You will need to integrate the Nginx web server with your W3 total cache if you use it. In this step of W3 Total Cache Settings, include your “nginx.conf” file to the Nginx Server settings, which is created by W3 total cache plugin on your public folder. Just untick the “Rewrite URL Structure” option if it is not working for you.
HTML & XML: – To reduce the loading time of your site, you should enable the inline minification to line up all of your CSS and JS in your HTML file. Enable all the options without the “Don’t minify feeds” option.
- Enable non-blocking by using “defer” before </head> and after <body>.
- Tick on the preserved comment removal and line break removal.
- Also, enable the HTTP/2 push.
CSS: – This feature can help to combine all of your CSS files into one file to reduce the network lookup time. It makes your CSS file lighter by reducing its size. Check the following settings for CSS minification.
- At first, enable the CSS Minify option and make it combined only.
- Always enable HTTP/2 push.
Advanced: – This feature is only applicable to those who have enabled the Memcached extension. Additionally, you should add all the external files like Google fonts and Analytic codes in your Minify settings. You also have the options here to change the garbage collection interval and update interval for external files etc.
Step 6. Opcode Cache
Let’s know some basic info about opcode. Typically, it is an enhancement extension of PHP. Opcode cache builds a cache of PHP code compilation into bytecode. All the time your web server will not compile PHP code. The web server will use the copy of opcode cache to minimize the parsing and compiling time of PHP files. You can enable the validate timestamp and select the Zend Opcache for opcode cache option.
Step 7. Database Cache
A database is a kind of place where everything on your website is stored. Your database may get crash when the user requests increase because all the information is pulled from your database once a user requests a post. So that you need a database cache.
It will save a cache of your database file on the disk to serve the information quickly without using the central Database. It ultimately depends on you of enabling or disabling the “Database Cache” option. It can optimize the database’s performance, which may improve the overall performance of your WP website.
It will be best to enable the option if you are on a dedicated server. On the other hand, allowing this option can hurt the performance of your site if your site is on shared hosting. It may overload the server’s CPU. You should leave the original settings as it is and no need to change anything.
Step 8. Object Cache
This option entirely depends on what type of hosting you are using for your site. You should observe some performance issues if you are on shared hosting.
We recommend not to activate the object cache and leave it as it is because it can make your backend slow. But you can enable it or disable it later if you experience some problem. You have to choose “Disk” as the Object Cache Method if you want to allow it.
Advanced: – In the advanced option, you may leave everything as default. Insert the following setting as mentioned.
- In the field of “Default lifetime of cache objects” enter 180 seconds.
- In the field of “Garbage collection interval” enter 3600 seconds.
Step 9. Browser Cache
This feature helps to speed up the website by storing resources in the browsers. In this method, the visitors or users don’t have to reload the site consistently. So you should enable the “Browser Cache” feature.
Because your browser always saves the temporary files from a site just like HTML, CSS, JS, images, and other multimedia files. You can enable HTTP compression and add headers in the browser cache feature to reduce the server load and decrease file load time.
General: – Under the “General” options, simply enable or tick the following settings. Also, leave the other options as default.
- Enable the “Set Last-Modified header.”
- Tick on the “Set expires header.”
- Click the “Set cache control header.”
- Allow the “Set entity tag (ETag).”
- Enable the “Set W3 total cache header.”
- Tick on the “Enable HTTP (gzip) connection.”
- Click the “Prevent caching of an object after settings change.”
- Allow the “Remove query string.”
- Select the “Don’t set cookies for static files.”
In the end, press the “Save settings” and “Purge Cache” button to save these options.
Step 10. CDN
CDN (Content Delivery Network) permitted you to serve the static content from many servers. It can reduce the load time and speed up your website. So you should enable this and leave the other options as default.
CDN providers like MaxCDN, StackPath reduces the geographical distance between your server and visitor. You have only one origin server without a CDN that can be very far away for many people. If you can use both Cloudflare and StackPath, you may get better results. Each of these CDN providers has their own data centers, and more data centers mean faster delivery of content.
StackPath CDN is especially suitable for improving items like use a content delivery network, reduce DNS lookups, reduce HTTP requests, cookie-free domains, and reduce cookie size. You also may use Cloudflare to host the cache of your WordPress web pages from different locations. It can improve the latency time for your users and visitors. You can easily setup Cloudflare and StackPath with W3 Total Cache plugin.
Step 11. Fragment Cache
Fragment Cache can make your website better and faster. If you want to use this feature, you may have to upgrade on W3 Total Cache Pro version. We will recommend to don’t use it because you should have some coding experience before using this feature.
Step 12. Reverse Proxy
You should leave the “Reverse Proxy” disabled because it requires private hosting.
Step 13. Monitoring
No need to configure it and you may ignore this option.
Step 14. Debug
We will not suggest it for the beginners. But if you are a developer, then you may need this feature. So select all the options in “Debug mode” if you want to use them.
Step 15. Extensions
At first, activate the “CloudFlare” feature and then go to the below steps. You may click the “upgrade” button in W3 Total Cache to get W3 Total Cache Pro version if you use the Genesis Framework in your WP site. This extension can improve site speed and allow additional speed features. You should activate the “Yoast SEO” feature if you like to use WordPress SEO by Yoast.
Step 16. Problems and Solutions
You may inspect some issues when configuring the W3 Total Cache plugin. We will support you to solve these issues. If you found that your website breaks and the formatting gets wacky, immediately disable the “Minify” option from the General Settings tab.
Disable the “object cache” option for slow WordPress dashboard. Always try to avoid slow loading plugins that are consuming high CPU. If your website gets crashed, then you have to open wp-config and delete these lines:
/** Enable W3 Total Cache */
define(‘WP_CACHE’, true); // Added by W3 Total Cache
Also, open .htaccess and delete all the codings between these two lines:
# BEGIN W3TC …
# END W3TC
After that, you need to delete:
- db.php from wp-content
- w3-total-cache folder in wp-content/plugins.
You are now ready to go, and all the things are set for improved performance of a lifetime. Hopefully, our W3 Total Cache Settings guide will help you to enhance your user experience, though these steps can be a bit technical. We would appreciate your suggestions and proposals if you have some.