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.
Related: How to work WooCommerce with W3 Total Cache?
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.
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.
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.
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.
Related: Exclude pages and directories in W3TC?
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.
Anybody have a good alternative to W3 total cache? We are having issues with it wanting to download a GZ file when you go to the website. It does this about every 30 days. We clear all the caches and it stops
What GZ file you want to download and why W3TC should impact that? If you are talking about cache expiry or garbage collection – you can setup that period in settings.
This helped me a lot, I was having big trouble using w3tc and bunny cdn, I didn’t even notice that such folders and files were in my host, thank you!
How do I perform these same above steps if my site account has been temporarily suspended by my IP until I remove malware? Can you give me these same steps accessible by ftp? Or, other means on IP’s File Manager? Thank you!
Anyway you need to get access to the front end to login. We recommend to whitelist your IP from your hosting account and follow the steps.
If that is not possible, login to FTP and delete the W3 Total Cache plugin’s folder under “/wp-content/plugins/” directory. Then follow the remaining steps. It may create some issues as the cache is not purged.
I accidentally was checking the folder today for some files and got this. Then searching over google I reached here. Thanks for this informative article. I have not checked these after removing the w3 cache.
Thank you, it was very helpful for me.
Many thanks for the tips, was having a problem of conflict of plugins and i had to remove the W3T but could not be completely eliminated.
Not sure if you realize this, but in the image showing which directories to delete, you show to delete the entire “uploads” directory.
Thanks for the inputs, the image is updated in the article.