W3 Total Cache (W3TC) is one of the most popular caching plugin for a WordPress site. It works out of the box by caching every element on your WordPress installation and helps to speedup the site. But this happens only if you configure the settings properly, otherwise it may do more bad than good. Also sites hosted on shared hosting platforms should be careful in enabling many options to avoid account termination. Whatsoever the reason, if W3 Total Cache is not working for you then the deletion process is not simple as you may think. In this article we will explain how to completely delete W3 Total Cache plugin from your WordPress installation.
How to Completely Delete W3 Total Cache Plugin?
Below are the steps to follow:
- Purge all your cache
- Deactivate and delete the plugin
- Check your .htaccess file
- Delete Cache folder
- Remove W3tc configuration folder
- Delete upgrade folder
- Remove object-cache.php Drop-in File
- Purge cache from your CDN server
1. Purge Cache
Before deleting any caching plugin, the first thing you should do is to clear the cached files. For W3 Total Cache, go to “Performance” menu on the top bar and click on “Purge Everything” option.
Remember this purge everything will not delete any of the cached content from the server.
2. Deactivate and Delete Plugin
Similar to deleting any other plugin just “Deactivate” the plugin under “Appearance > Plugin” section. Once deactivated, then “Delete” plugin to remove the plugin folder from “/wp-content/plugins/” folder.
Deactivate and Delete W3TC Plugin
3. Check .htaccess File
W3TC will create many directives in .htaccess file to control the caching behavior. Each section will start and end with comments like “#BEGIN W3TC Page Cache core” and “#END W3TC Page Cache core”.
Ensure that no residual entries are left over in your .htaccess file after deleting the plugin.
Deleting Other Directories
W3TC creates many other directories under “/wp-content/” folder as shown below. You should delete all these directories and subdirectories to cleanup. We will explain this in further sections of this article.
Residual W3TC Files
4. Delete Cache Folder
W3TC will create a “Cache” folder under “/wp-content/” and stores all the cached content of your site. The content here depends on the enabled settings. Each type of enabled caching will create a directory here. For example, enabling page caching, database caching and object caching will create three different folders and store the content separately.
Content of W3TC Cache Directory
Depending upon the size of your site, you will see huge number of subdirectories inside each of these folders. On shared hosting environments, this will resulting in violation of terms where file count and directory counts are limited. Also deleting these cached content is not an easy task due to the large number of files.
5. Delete W3TC Configuration Folder
The plugin stores all the saved configuration settings outside the “/wp-content/plugins/W3TC” directory. This will help the plugin to restore the settings when delete and install again. When you decided to completely get rid of the plugin then delete the folder “/wp-content/w3tc-config”.
6. Delete Upgrade Folder
W3TC also creates an “Upgrade” folder under “/wp-content/” directory. We believe this folder is used to save settings related to upgraded premium version. Ensure to delete this folder as well.
7. Delete Cached Files from CDN
Besides deleting all the relevant files, if you use CDN then ensure to purge the cached content from your CDN. This is necessary when you enabled minify option in W3TC settings. You should delete the minified and combined scripts and CSS files from your CDN server to avoid the site breaking on the browser.
8.Remove object-cache.php File
It doesn’t end there. W3TC also adds a “drop-in” plugin for it’s object caching. The file name is “object-cache.php” and available under “/wp-content/” folder. We also recommend to delete this file. When you install another caching plugin, most probably they will create this “drop-in” again.
As mentioned, it is easy to install W3TC plugin on your WordPress site. But it is not easy to remove it from the admin panel. You should use FTP to access the backend server to remove the files completely. This is the same situation with many of the caching and security plugins. At least one good thing is that W3TC does not create any MySQL database tables. So be aware this fact before trying to install unnecessary plugins on your site. You can also checkout the other available caching plugins to choose the best one for your site.