Remove W3 Total Cache Comment Footer

Securing your WordPress huh? Many people do all these stuffs and come to a halt with this issue – every time, in every page, same W3 Total Cache credits are shown in the HTML source. Even if your designing a WordPress based site and at the end trying to remove all those traces, W3 Total Cache everywhere right? So your ready to Remove W3 Total Cache Comment Footer?

How it looks like?

In the HTML Source code, It’s somewhat like this :

<!-- Performance optimized by W3 Total Cache. Learn more:

Minified using disk: basic
Page Caching using disk: enhanced
Object Caching 974/1079 objects using disk: basic

Served from: @ 2013-03-04 22:22:05 by W3 Total Cache -->

Seriously come on, I don’t like this to show. Yes even if its a free plugin, still it will reveal information right? What if I am doing some projects that must hide all the trace of WordPress for security purpose, then?

Remove W3 Total Cache Comment Footer

Ok – Not going to bore you with the blah blah talking, moving on with the trick, its simple – again! You just need to edit a simple file & bang! your done. 😉

Take your file manager, Navigate to the folder : “/wp-content/plugins/w3-total-cache/lib/W3/Plugin” and open the file “TotalCache.php” with a code editor or a text editor.

Search for the line “if ($this->can_ob()) {“

W3 Total Cache - File Editing

Just remove the following lines from it :


After you done removing those lines, it should look like this :

if ($this->can_ob()) {


Now Empty All Caches and wallah! No more W3 Total Cache comment in HTML Source code!

March 5, 2013
Previous Post Next Post

Tharun recommends you to read these fantastic articles