How to Install the W3 Total Cache Plugin in WordPress

DEVELOPMENT

How to Install the W3 Total Cache Plugin in WordPress

This Part 3 of our W3 Total Cache series takes you through how to Install the W3 Total Cache the right way, and questions about compatibility.

This tutorial is the third part of a series relating to W3 Total Cache. This part of the series takes you through how to Install W3 Total Cache the right way, and questions about compatibility.

In Part III of the series, we will look at the following:

  1. Preparing your WordPress website before Installing W3TC
  2. Installing the W3 Total Cache Plugin
  3. Troubleshooting Installation Issues
  4. W3 Total Cache Requirements
  5. W3 Total Cache Compatibility Questions

Part IV will look at how to set up W3TC, with particular reference to the General Settings.

(Part IVis due to be posted on or before the 22nd November, with subsequent sections following each day or two after that. In the meantime, please check out our old tutorial (which this is meant to replace) here.)

1. Preparing your WordPress website before Installing W3TC

If you have just installed WordPress, there should be nothing you need to do as all the files will be fresh and unaltered. You can proceed to install W3TC as per Step 2.

If you are installing W3TC on an existing installation, then we recommend you carry out a few additional checks. This is because some plugins (i.e. other caching plugins) use specific files \ code that can cause a conflict. Even if you have deleted those plugins some of the files \ code may be left behind, especially if they were uninstalled incorrectly.

The checks we recommend doing for existing installations are as follows:

a. Delete any other WordPress Caching Plugins

Check whether you have any other WordPress Caching Plugins installed, such as WP Super Cacher. These will modify the same files, and, therefore, may cause conflicts with any installation of W3TC.

b. Check the .htaccess file for conflicting code

When caching plugins are deleted incorrectly, they can leave the code in the .htaccess file behind. When deleting a Caching Plugin, you should first disable all the functionality within the plugin settings first, disable, then uninstall.

The standard .htaccess code for WordPress is the following:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

It is possible you have other code, such as redirect to HTTPS or something inserted by other plugins \ themes. This is quite normal, and you should not automatically delete everything. Usually, each piece of code will have a code comment (a comment starts with a "#", or the comment is located between /* */ ) describing what it is for before the code starts. Therefore, look for any code that relates to any old cache plugins and delete it.

The following video \ instructions show how to check your .htaccess code within cPanel File Manager. In the example below, we will delete some code left behind from an old WP Super Cache installation.

  1. Login to cPanel
  2. Click on File Manager icon, and make sure you select "show hidden files". On New Versions of cPanel, you may need to load the File Manager and select "show hidden files" in the "Settings" menu in the top right-hand corner.
  3. Navigate to your WordPress directory
  4. Load .htaccess file
  5. Check, and delete unwanted code.

c. Check for files that may conflict with files W3TC needs to install

There are some core files that are used by most Caching Plugins and sometimes used by other plugins not related to caching. These files are located in the "wp-content" directory:

  • db.php
  • advanced-cache.php
  • wp-cache-config.php (not needed by W3TC, but should be deleted)
  • object-cache.php
  • The entire Cache Directory

These files are required for the advanced page caching, database caching and object caching functionality in W3 Total Cache. You should ensure these are deleted before installing W3 Total Cache if possible. You can use the File Manager in cPanel (or other control panels) to remove the files.

It is usually "db.php" that is used by some other plugins unrelated to caching, so you may want to consider this before deleting. If you cannot delete it, don't worry. Just don't activate database caching.

2. How to Install the W3 Total Cache Plugin in WordPress

The installation of W3TC is very easy, provided you are happy there will be no conflicts as per Step 1 above.

Step 1 — Log into your WordPress Admin Area

Log into your WordPress Admin Area in the usual way via:

http://www.yourdomain.com/wp-login.php

After entering your username and password, you will automatically be taken to the Admin Area Dashboard.

Step 2 — Hover over the "Plugins" option in the side menu, and select "Add New."

You can add a plugin in WordPress by selecting "Plugins" -> "Add New" on the left-hand menu in the WordPress admin. area.

Step 3 — Search for the W3 Total Cache Plugin

In the top right-hand corner of the "Add Plugins" screen, you will see a search box. Click in the search box and type "W3 Total Cache", and press "Enter". The top result will be the W3 Total Cache Plugin.

Step 4 — Install and Activate the W3 Total Cache Plugin

3. Troubleshooting W3 Total Cache Installation Issues

Please check our W3 Total Cache Troubleshooting page here (coming soon)

4. W3 Total Cache Requirements

  • Web servers supported: The plugin developers are aware of no incompatibilities with Apache 1.3+, NGINX 0.7+, IIS 5+ or LiteSpeed 4.0.2+.
  • RAM Requirements: This depends on if you are using RAM caching functionality. If you use disk caching, you will find that your RAM usage will decrease. If you use RAM caching, then you should allow at least 50MB of memory for the opcode cache although we would recommend at least 256MB to enable a larger expiry time.
  • PHP Version required: The plugin works with version PHP 5.2 and above.
  • mySQL version required: If you can run WordPress, your mySQL version is adequate.
  • Mod-rewrite required: Yes, you need mod-rewrite enabled on your server. You will want this for WordPress functionality such as "fancy URLs" in any event.

5. W3 Total Cache Compatibility Questions

When installing a plugin like this, especially onto some more complex WordPress Themes \ websites that use many plugins it is always possible there may be some conflicts with W3 Total Cache that can cause issues. We have summarized some common questions about compatibility below:

  • Does this plugin work with WordPress MU ? — Yes, it is fully compatible.
  • Does this plugin work with BuddyPress (bbPress)? - Yes, it is fully compatible.
  • Which WordPress versions are supported? — You need a minimum of version 2.8.
  • Will the plugin interfere with other plugins or widgets? — Sometimes you can experience display issues caused by using the minification functionality. If this occurs, you can disable minification, or try to configure minification manually.
  • Is this plugin compatible with other popular caching plugins? — No, you should uninstall any other caching solutions (not just disabled). We recommend carrying out Step 1 of this tutorial above.
  • Is this plugin compatible with GD Star Rating? Yes. Follow these steps:
    1. Enable dynamic loading of ratings by checking GD Star Rating -> Settings -> Features "Cache support option."
    2. If Database cache enabled in W3 Total Cache add "wp_gdsr" to "Ignored query stems" field in the Database Cache settings tab. Otherwise, ratings will not be updated after voting
    3. Empty all caches
  • How do I get WPTouch to work properly together with W3 Total Cache? — You should enable "User Agent Groups" high and low and add any user agents you think are missing.
  • Is this plugin compatible with TDO Mini Forms? — Captcha and ReCaptcha will work fine. However, you will need to prevent any pages with forms from being cached. Add the page's URI to the "Never cache the following pages" box on the Page Cache Settings tab.
  • Is this plugin compatible with varnish or squid? — W3 Total Cache is compatible with Varnish.
  • Does this plugin work with Optimize Press? — This plugin WILL work with OptimizePress but Do not use the "minify" function as this will break the styling on your pages. Also, if you're using OPtimizeMember do not use the object caching mode as this can cause an issue.
  • Does this plugin work with the X Theme? — Some issues have been reported when using minification with the latest version of the X theme. You may need to disable Minification, or setup minification manually and troubleshoot.

If you have any other help and advice or have errors related to installing W3 Total Cache, please let us know in the comments.

Related tags
Check out our top user-rated host: SiteGround
Need help choosing a hosting provider?
Check out our top user-rated host: SiteGround