Home / Articles / WordPress / W3 Total Cache Plugin – Beyond General Settings

W3 Total Cache Plugin – Beyond General Settings

In an earlier article, we stressed that it is important to have a fast loading website and that W3 Total Cache plugin can help reduce load time and generally speed up websites. We also looked at the General Settings for this plugin in that article. Now, let's look beyond General Settings and understand how to fine tune this plugin for optimum performance.

A word about this plugin before we delve into the advanced features – to get the maximum benefit out of W3 Total Cache, some advanced server side scripting and hosting configuration are required. But even without this, we can get some good results.

After you install and activate W3 Total Cache plugin, look for Performance on the dashboard and click on it. The Dashboard of the plugin will open up and you can browse there to have an idea of the range of functions of this plugin.

5

The additional features available with Premium Services can be found here. Feedback can go to the plugin's developers from the link back under Spread the Word. Statistical information on website performance from the server viewpoint can be found under New Relic. Once you have configured the plugin, the Google Page Speed report will display information on the performance of your website.

Now, let's configure the plugin.

Click on Performance > General Settings.Take a glance at the options opening up under General Settings. You can adjust the settings under each option.

5a

1. Preview Mode

To check out the effect of the W3 Total Cache plugin, you can enable the Preview Mode. When this mode is enabled, only the Admin can see the effect of a change. When this mode is disabled, the viewing public can also see the effects of the changes made by this plugin.

5b

In the image above, the preview mode is disabled. You must enable the preview mode while making changes to settings, observe that they have the desired effect on the website and then disable them again after saving the changes.

2. Page Cache

Every time a viewer calls for a page, WordPress accesses numerous PHP scripts and runs database queries, all of which take up server space and slow down the website. When you enable caching on a page, this process is made quicker for repeated requests.

7c

Under the page cache settings, you will have to choose the page cache method as well. The choice is dependent on the server the website is using. The default setting for this is Disk Enhanced. This is fine for most websites.

5d

As you will have to make this choice repeatedly for all the settings, let's take a look at the other options besides Disk Enhanced.

Disk Basic and Disk Enhanced is for shared hosting. You can pick Disk Enhanced, but if your site slows down or if your are taking up too much server resources, you can move back to Disk Basic. Or else change your hosting plan or hosting provider.

Dedicated/Virtual Servers are a higher order of servers. Dedicated servers are not shared with any other website or person, while Virtual servers are shared by very few persons or websites.

Opcode: Alternative PHP Caching (APC) – Here the PHP code is cached using open source PHP solutions.

Opcode: eAccelerator – This is a PHP encoder and loader.

Opcode: XCache – A very fast and stable opcode cache. It is fully supported by Windows and Linux.

Opcode: WinCache – An open source PHP solution exclusively for Windows.

Multiple Servers: Memecached – If a site is supported by more than one server, then the memecached option should be checked.

3. Minify

Code contains stuff like comments, new line characters and blank spaces which inflate the size of the code. Minification rids the code of redundancies. HTML, Java and CSS script are the culprits here and minification of these, will improve speed perceptibly.

You will also have to choose options under HTML Minifier, JS Minifier and CSS Minifier. The default options would work just fine, but in case of conflicts, you can choose the other options and see which one works for you. If the issues remain unresolved, you can also disable the minification option. This will often be the case when Lite Speed is installed.

8a

You will have to choose the Minify cache method based on the explanation in (2) above. The recommended option here is Disk.

8b

4. Database Cache and Objects cache

9

Enabling the database cache option means you are caching the SQL queries. Finding a page on the server involves searching in a very large database. Caching reduces the time for this search, but it consumes server resources. So, on a shared server, it may actually reduce speed. The way to go about it would be to enable database caching and then analyse the site's speed. If it results in a slowdown, disabling it may be a better option. This option works best on a Dedicated or Virtual Server.

9a

Enabling the objects cache helps reduce the process time of some operations. It is advisable only for Dedicated or Virtual Server.

9b

5. Browser Cache and Content Delivery Network

Browser cache is a very important option and must always be enabled, whatever hosting method you are using. This setting uses the cache in the web browser of the visitor to reduce server load and response time. Headers are added and HTML compression is possible. When a page is requested for a second time, response time improves dramatically.

10

Sometimes content is stored on a number of servers across the globe. A Content Delivery Network directs the visitor to the geographical server nearest to him. If you are not using a Content Delivery Network, then disable this option.

8. Reverse Proxy

11

With reverse proxy, your static files are cached to different servers all over the globe and can be accessed through a cloud by a visitor. It is better not to enable this for WordPress sites

9. Monitoring

12

You should enable Monitoring only if you want to have detailed statistics of your site and server performance and if you are familiar with New Relic.

10. Miscellaneous

13

Acquire an API key by following the link given below the field and then enter it in the Page Speed API Key field. The other options are only for advanced users.

11. Debug and Import and Export settings.

Debug provides detailed information about each cache and can be viewed publicly in the source code of the page. This will help you figure out what is working and what is not. Enable only when required and disable soon after.

14

All settings can be exported and then imported subsequently into the same site or a different location and serves as a good backup.

A major factor in the successful use of this plugin is the hosting provider's software and configuration constraints. If your hosting environment is not suitable, or if the configuration options are proving too much for you, you may want to revert to the more simple W3 Super Cache as most servers can work optimally with this plugin on a very basic installation.

Photo of author

Article by Vishnu

Keep Reading