Uninstall W3 Total Cache The Right Way

A few days ago I began the process of removing W3 Total Cache from all my blogs. Why, you might wonder, would I do that. The simple answer is that W3 Total Cache crashed my sites. The plugin conflicted one too many times with other plugins and I’m getting old and tired and I’m fast coming over to the idea that if a plugin is too much hassle to setup then it shouldn’t call itself a plugin so much as it should call itself a nail in sanity’s coffin.

You’d expect it to be easy to remove W3 Total Cache. And uninstalling the plugin should be but W3 Total Cache hooks its tentacles into a WordPress site’s htaccess file, sticks multiple files into the wp-content directory and, after removal, Google persistently requests (no longer existent) cached minified CSS files.

All in all, getting rid of W3 Total Cache can be a bigger pain than being kicked in the ass by a galloping donkey on steroids.

In general, once setup, W3 Total Cache can be left to cache WordPress blog posts and pages faultlessly without any human monitoring but it gets temperamental when new plugins are installed, especially ones that use Javascripts when W3TC is configured to minifi Javascript.

If you use W3TC and you find some newly installed plugins fail to work or they bring down your whole site then you can almost guarantee the fault is with W3TC. Ditto if plugins work for logged in users but not for logged out visitors.

When you install a plugin and a W3TC cached site breaks, and you want to keep W3 Total Cache installed then check w3TC’s minification and concatination settings before deciding to remove W3TC.

Removing W3TC is a bit of an art

You will need to find an adequate replacement for W3TC. I’ve moved over to Quick Cache Pro and I’m very happy with it. My sites work well with Quick Cache Pro and get good results from speed tests (when externally loaded scripts are discounted, though Quick Cache can cache and minify external scripts if set to do so).

Removing the monster that is W3 Total Cache

Important: keep the plugin enabled until told to disable it. If you’ve already disabled and deleted W3 Total Cache then I suggest you re-install it and re-enable it then follow these instructions to properly remove W3TC.

  1. Make sure the latest version of W3 Total Cache is installed.
  2. Ensure your htaccess file has its permissions set to at least 644.
  3. Ensure wp-config.php has its permissions set to at least 644.
  4. Enter W3TC’s General Settings panel (Performance>General Settings):
    • Disable all caching
    • Run through the list of enabled caching types and untick “Enable” for each and every one of them
    • At the bottom of the General Settings page is a Miscellaneous section, untick everything in it
    • Click “Save All Settings”
    • If you are unable to disable the caching options just skip to step 6.
  5. At the top of the screen, in red writing, you will now see that it says “The plugin is currently disabled”.
  6. Go to your WordPress plugins panel and find W3 Total Cache (Plugins>Installed Plugins):
    • Deactivate W3 Total Cache
    • Delete W3 Total Cache.
  7. Browse your site’s root directory with an FTP program or cPanel provided file manager. Enter the wp-content directory and delete the following W3TC files (if they exist):
    • w3-total-cache-config.php
    • db.php
    • advanced-cache.php
  8. Still in the wp-content directory, delete the ‘cache’ directory and delete the directory ‘w3tc’ and all its content.
  9. Check the site’s .htaccess file has no W3TC re-write rules in it.
  10. Finally, open the wp-config.php file and remove:
    define('WP_CACHE', true);

Recommended WordPress cache plugin

Each server is different and each site is different so there is no ‘one cahe to rule them all’ WordPress cache plugin. Trial and error works best for establishing the best cache plugin for your site. Some sites work better without any caching.

My preferred cache plugin is Comet Cache Pro. More plugin recommendations to improve page speed can be found here.

Sharing is caring!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

newest oldest most voted
Notify of

You should try BWP Minify with Quick Cache. I use it on my blog and it shrinks page sizes and cuts requests as well. http://betterwp.net/wordpress-plugins/bwp-minify/

I took a look at it. Thanks for the suggestion but It seems like a lot of work to get a plugin working. Saying that, I didn’t install it, I only looked at the download page.


Actually for 75% effectiveness, just download and activate it. The rest is for tweaking.


Setting the wp-config.php to 700 made my site + admin go http error 500… Not knowing this was the cause I messed things up even worse… When I finally found out this was the cause (by adding php_flag display_errors on  to the .htaccess file in the root), I was too far gone and had to go reinstall the whole website from scratch……

But what I don’t understand even now is, why does the wp-config.php needs other permissions than the 644 it has? It’s not like it’s going to be altered when w3tc is being removed.

I’m sorry to learn that, Sjoerd, I would have helped you had you told me about it. Different servers are configured slightly differently so some permissions will give 500 errors. I’ll edit the post to prevent others doing the same. The reason I suggest changing the permissions of wp-config.php is purely out of security concerns. The file contains a website’s database login details. It’s a prime target for hackers looking for ways into a site. Hiding the file to everybody but the server makes it harder for a hacker to view it or download it. I usually use 400 or… Read more »

Tank you! Great write! I agree :)


Thanks !  I have also removed W3, although mine was easier, but I had to go delete the files mentioned by you.

I also felt Quick Cache performs better, after all, it does the basics, which is all I need.  Being lightweight is good too.

I’m getting old and tired too *lol*

Hi, Dion

Thanks very much for writing this post. I’m pretty sure you just saved me some headaches down the track!

I have no doubt W3 Total Cache works really well, but — as you say — if it conflicts with too many other plugins, etc. then you could argue it doesn’t work that well at all.

But what would I know?

Anyway, thanks for the removal steps. Worked like a charm!

All the best,

Glad to help. I’ve felt 100% less stress since I removed it, lol.


Hi, I am uninstalling it as well, it keeps taking a lot my page content down and screwed up my themes as well which all was fine till using this W3 total cache this plugin is trash in my opinion. Thanks for the instructions


I’m unclear about one of your steps above . . .   #9. “Check the site’s .htaccess file has no W3TC re-write rules in it”

I don’t know enough to know which ones would be from W3TC.  Here is what I have:

RewriteEngine OnRewriteBase /RewriteRule ^index.php$ – [L]RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule . /index.php [L]Are this standard or from W3TC?Thanks.

Hi Garry, if that’s all you have then you’re good to go. They’re the WordPress rewrite rules.


Thanks for clear steps..really helped while removing W3 Total Cache


Excellent write-up! Thank you!

I think I’m good to go except for the .htaccess-related stuff. I have the following in my .htaccess file (appearing above some 301 redirects that I would like to keep there).

# BEGIN W3 Total Cache

    SetEnvIfNoCase Accept-Encoding (gzip) APPEND_EXT=.$1

    RewriteEngine On
    RewriteCond %{REQUEST_URI} /$
    RewriteCond %{REQUEST_URI} !(/wp-admin/|/xmlrpc.php|/wp-(app|cron|login|register).php|wp-.*.php|index.php) [OR]
    RewriteCond %{REQUEST_URI} (wp-comments-popup.php|wp-links-opml.php|wp-locations.php) [NC]
    RewriteCond %{REQUEST_METHOD} !=POST
    RewriteCond %{QUERY_STRING} =””
    RewriteCond %{HTTP_COOKIE} !(comment_author|wp-postpass|wordpress_[a-f0-9]+|wordpress_logged_in) [NC]
    RewriteCond %{HTTP_USER_AGENT} !(bot|ia_archive|slurp|crawl|spider) [NC]
    RewriteCond /home/.pru/heffern/obliviousinvestor.com/wp-content/w3tc/pgcache/$1/_default_.html%{ENV:APPEND_EXT} -f
    RewriteRule (.*) wp-content/w3tc/pgcache/$1/_default_.html%{ENV:APPEND_EXT} [L]

# END W3 Total Cache

Is it safe to delete all of that?


Update: I went ahead and deleted that from the .htaccess file after backing it up. Seems not to have caused any problems.

There still must be something I’m missing though, because every time I try to save anything (a post, or page for instance), I get an error message:

Warning: Cannot modify header information – headers already sent
by (output started at
in /var/www/vhosts/obliviousinvestor.com/httpdocs/wp-includes/pluggable.php on line 866


Update #2: Apparently that error was caused by accidentally entering a line break in a file that I had been checking for W3TC-related code. After deleting it, everything is peachy. (And all W3TC-related stuff seems to be gone as far as I can tell.)

Thanks again for the helpful guide. :)

You’re welcome Mike, I’m glad you solved it. Would have been here sooner but have been writing a script.


This is the best W3TC removal tutorial! Thank you very much.

Neesa Cambay

Pleasing thank you so much for this information   

php web development

Just wanted to say that the latest version of W3 Total Cache seems very well-behaved; I had only to delete “w3-total-cache-config.php” — everything else was apparently removed by the uninstall process (deactivate and delete)!!

Now I just hope my site works again…I had to take out W3 Total Cache due to conflicts with my shopping cart plugin!


Thanks so much for this write-up. Worked like a breeze.

Remember from an older site that unistalling W3TC drove me nearly insane.

Now absolutely painless.


Thank you so much for this. I’ve been fighting with my W3TC configuration for several days, and finally gave up on it entirely this morning. Which, of course, is when the REAL fun began… trying to figure out how to remove it. To be fair, I think it’s important to say that W3TC is an extraordinary and powerful tool that works VERY well — PROVIDED you know what you’re doing. Which I didn’t. Nor do I have the time or inclination to invest in the learning curve. There are plenty of OTHER things I need to learn first, and every… Read more »


Well said, Laurie.  I’ve quit W3TC, came to Quick Cache, found it nice but wanting after some time, learned more about W3TC, and reinstalled.  I now have blazing speed for cached pages.  The best so far.


p.s. never minify with W3TC, use Better WordPress Minify, solves a lot of problems.


Totally agree. I chose W3TC because I knew I wouldn’t grow out of it, and I suspect I’ll be back once my site is more mature. It was the minification that ultimately did me in. I had pretty much figured everything else out – lots of pain and suffering in the process, but it was educational and I was making progress, so I had high expectations. Then I moved on the minify part. At one point last night I had it all working perfectly. So I poured myself a nice adult beverage to celebrate. And THEN… I added a couple… Read more »

this is one of the worst mistakes i ever did as a webmaster installing this plugin that promised a lot and it did do some wonders however, compromised useful plugins. seriously its one of the worst wp caching plugins out there. thanks for the article it really helped    


Help!  After deactivating this plugin my site crashed with the typical ‘500’ error.  I then found instructions for removing all the files via ftp, which I did.  The 500 error persisted, so I then manually copied the W3TC files via ftp back into the proper directories, and still I’m getting the errors.  I’ve also removed every other plugin in my directory and still…nothing works.  Any ideas would be GREATLY appreciated.


In addition to deleteing db.php and advanced-cache.php out of the wp-content directory, there is also object-cache.php. I believe this would have to be deleted as well because it is a file W3TC creates?


 Thanks :-)  It turns out that my wp-config file was all jacked.  I had to edit a number of lines to fix it, but now I’m back up and running, and without W3TC!


thanks so much for taking the time to write this post! worked like a charm. TotalCache conflicted with Jigoshop cart. I found SuperCache to be much more user-friendly. If you’re not familiar with all the things w3tc offers, it’s a bit overwhelming.

Thanks for the detailed instructions Lee. I have removed WP Total Cache and installed WP Super Cache and Minify plugin. Things seem faster already. Thanks again, your article helped a lot.

I have set up WP Super Cache just as you suggested Lee. I do not have dynamic widget content, what is the plugin that you recommend to caching widgets?

Nice Post! I have a lot of problems with total cache, who’s ruin my website… I’ve uninstalled like you said and install quick cache and happy with the results for now…

Martin Cooney

Oh I couldn’t agree more in reference to plugin sanity.
I battled for many months with W3 Total Cache, with little performance gain. Probably due to incorrectly setting it up.
After research, I installed SuperCache and what a breath of fresh it was. Up and running in 30 mins and remarkably evident performance gains.
SuperCache is certainly recommended, as far as I’m concerned. Good write up,


It really helped in saving my website from downtime … http://www.dealmaker.co.in

Done, I got lots of problem after installing this and in future i don’t want to install any cache plugin :) :)

Hi Lee, THANK YOU so much for these instructions. I have followed them exactly with the exception of the .htaccess file. Every time I click to open it, I am asked do I want to ‘overwrite’ my local copy of this file, so I tell it no (I use Macromedia Dreamweaver MX 2004 to access my host server) and I immediately get this message – Can’t find a valid editor for this file extension.” So how can I open this file to check and see if this plugin did some re-writes that I need to remove? Thanks in advance for… Read more »

WHEW! That did the trick! Thank you so much for all your help!

Thanks! The new W3TC upgrade was causing timeouts and was missing scheduled posts. Deinstalling it only partly worked and it mangled htaccess. This article help hugely


Have been struggling with W3TC for a couple of days now. I get all kinds of weird error messages. The plugin wants access to my FTP, which I give it. It still complains that it hasn’t got permission to create and write to files in the wp-content directory. And all of a sudden it has changed the permissions of the wp-content directory. First to 051, which meant I could not even access it myself via FileZilla. Could not even browse my own website online, all I got was a blank page. Had to call my web hosting support so they… Read more »

Hello I found this post after a crash and burn deleting W3TC from a clients site, last time I do that thanks to this post, but I’m looking in the file manager and I removed the 3 you mention but I still have a couple of files “W3TC” W3TC-config” and “cache” should these all be deleted as well? I’m afraid to touch them after that mess I just encountered. Thanks for any advice.

correction I just saw you mention the w3tc file so deleting that now, but the other 2? I do plan to install super cache once this is cleaned out.

I had a big mess and needed to remove it completely so I could go back to a previous version and your tutorial did the trick. My whole admin end had collapsed when I tried to upgrade. One site was fine; one was not…
I really like the plug-in. I was able to raise my site scores on YSlow from a C and a D to a B but I know the new upgrade has caused some issues.

What about the /cache/ folder that sits in my wp-content directory? I can’t seem to delete or modify it without root access which I don’t have… is this a problem?

Abe Li

Very helpful, thanks for sharing the tips. I have dumped W3C for WP super cache, a GTmetrix test shown super cache is much faster.


I tried to follow the steps and deactivate the plugin – but it keeps giving ‘internal server error. How do I get rid of this w3 plugin menace

Santo Clemenzi

Few minutes ago I just deactivated W3TC on my girlfriend’s blog…you know what? W3 was destroying blog performance…I can’t explain how it’s possible but simply deactivating the monster the site works better. I’ll monitor the blog and if it would be necessary I’ll try WP Super Cache. Thank you for this post!

Well, thanks a million for this tutorial. I managed to get this done, but there are a few more things to note:

I also had a file in the wp-content folder called “object-cache.php” that had to go.

W3 seems to finally be gone. Let’s hope Super Cache holds its ground.


Wow, what a lifesaver, thanks so much for posting this! I was totally locked out of my admin, this lead me to the culprit.


So far so good, your steps are easy to follow for a relative newbie. However I’m not sure about one of your steps above . . . #9. “Check the site’s .htaccess file has no W3TC re-write rules in it” I don’t know how to identify the rewrite rules from W3TC. The file has a section clearly labeled # Begin WordPress and # End WordPress. Below the WordPress stuff there are 22 RewriteCond rules all followed by [NC] and 1 Rewrite rule followed by [F,NC]. There is no # Begin or # End around them and no reference to W3TC… Read more »

Thanks. That was pretty helpful. I have switched to WP Super Cache and things are fine now. btw I realized while installing WP Super cache that the blank page issue could be because of the .htaccess file of cache folder that I deleted while debugging some issues of W3TC. Anyways I am not going back.

Thanks again!

Thank you very much for posting these instructions!

I recently switched from W3 to Hyper Cache Extended with the DB Cache Reloaded Fix, because with W3 each page load still resulted in about 160 database queries, while with the latter it is only 32.

Yet getting rid of E3 was a huge headache, as deactivating and simply uninstalling it resulted in a home page that wasn’t updated anymore – it seemed as if the site was set to display an old cached version of it ad infinitum.


Would PageSpeed provide an alternative to a WordPress cache plugin?

Worst thing I ever installed on my sites. Once installed it took Google hours to index my latest posts, whereas before installing Total Cache, they indexed almost immediately. Plus, when they did index with Total Cache, Google wasn’t indexing the description correctly. Deleted this terrible plugin and, voila, no problems :)

@Lee. Thanks again. I saw your comment about WP Minify. I did get W3 working again and use the minify there. I also have Cloudflare and have been thinking about using them to minify. Haven’t decided yet. Got my scores up to an A so I a leery to mess with it.


W3TC was causing problems with some software that was installed on my site, rendering it useless. But I needed it. The software, not W3TC. I’m going with Quick Cache. It’s still being supported and was last updated 3 days ago. I use it on another one of my sites and had no problems with the new software. Anyway I hate Super Cache. Never know what settings to go with. Yes I know, recommended. But if you search a little everyone has their own recommendations. Phooey!


Helpful post, thanks. You can add to step 8…

Still in the wp-content directory, delete these two entire directories as well (if present):


Realmente conflito entre plugins é extasiante.
Também estou usando esse plugin.

Thanks for this, I actually installed W3 Total Cache on my site as an experiment when I was already running CloudFlare, which also acts as a cache. The site was a few seconds slower and it proves running two plugins essentially doing the same thing was overkill.

Getting rid of W3 Total Cache has been tougher than I imagined!

I also used W3 Total Cache but I keep getting server downtime. Now with WP Super Cache, its rocket fast.

After using w3 Cache plugin my permalink was change and I am not able to fixed it even after deleting w3 cache plugin now whenever I am going to open any page from any category its show 404 page please help me ?

Thanks so much for this info, my site crashed after I installed this plugin, but luckily after following your directions I got it back up, thanks again!

W3 Total Cache crashed my website css and javascript, what can i do? :(

Great article!! Thank you so much! I had the same problem with this ugly plugin and it was a real pain in the neck for a while! I tried everything to delete it and nada! I could not do anything at all! So, I read your article accidentally and here I am.. Thanks God and thank to you, finally I managed to delete this awful plugin!!!

I really wanted to send a small word to say thanks to you for the fantastic points you are writing on this site

Sir i deactivate and deleted this plugin but i forget to change this settings to normal will it makes problem in future ?

Hi, this post is the best I’ve found yet about getting rid of this pesky plugin! It started causing severe conflicts on my site over a year ago. I deleted it after determining that it was the cause, but unfortunately I didn’t realize it left files on my server. I’ve deleted the ones you mentioned above, but I’m unclear about I’m unclear about #9. “Check the site’s .htaccess file has no W3TC re-write rules in it” First, I have multiple .htaccess folders, including one that was just empty, so I deleted it. Shouldn’t I just have one? Second, when I… Read more »


THANK YOU! helped me take down W3. Never knew installing a plugin could be such a pain in the butt.

Prasad Dusane

HI Sir,

i deleted w3 total cache from c panel without deactivating it. now I cant access my website and also wp-admin.

my website is dronesdevil.com.. please tell me what to do?

Vicky Hipkins

Thank you so much for this info, My website wasn’t showing correctly after using W3TC plugin and I couldn’t get it to work even after removing the plugin. I have had a team of professionals looking at it for over a week with to no avail. Thanks to this I have fixed the issue myself :)