The W3 Total Cache is a caching plugin for wordpress which improves the performance of your wordpress blog. When this plugin is activated it inserts a HTML comment into your code which looks like this
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/ Minified using disk Page Caching using disk (enhanced) Database Caching using disk Served from: www.example.com @ 2011-07-04 06:59:27 -->
If you wish to remove W3 Total Cache Footer follow my instructions.
The comment is generated from a function named ob_callback it is located in
/home/username/public_html/wp-content/plugins/w3-total-cache/lib/W3/Plugin/TotalCache.php
replace public_html with www or htdocs which ever is applicable to your web server. Open this file and locate the lines
if ($this->can_ob()) { ob_start(array( &$this, 'ob_callback' )); }
Now comment out the lines inside the IF loop
if ($this->can_ob()) { /*ob_start(array( &$this, 'ob_callback' ));*/ }
Thats it now save the file and reload your wordpress blog now you won’t see the W3 Total Cache Footer code.
Sam Ami says
Was looking to minify every aspect of my site. So I thought I should remove those final comments generated by W3 and this article helped. Thanks.
Alberto says
That’s for the information, very usefull because there was a problem with the W3 Total Cache
Ganesh says
It is not working
Jesin says
Hi Ganesh,
I checked your website, I think you want to remove the footer displayed at the bottom of your website which reads
“Performance Optimization WordPress Plugins by W3 EDGE”
if this is the case
This will remove the footer.
Ganesh says
Thanks For Reply
Till does not work
Jesin says
Try clearing all Caches by going to Performance > Dashboard and click the “empty all caches” button.
Laurence says
Isn’t this modifying the W3 core files? Wont it be back next time it updates?
Jesin A says
Yes, it will be back when the plugin is updated, but this plugin gets updated only once or twice a year (unless a security flaw is discovered).
Have a look at the development log – https://plugins.trac.wordpress.org/log/w3-total-cache/
Moreover the TotalCache.php file hasn’t been modified for a long time – https://plugins.trac.wordpress.org/log/w3-total-cache/trunk/lib/W3/Plugin/TotalCache.php
If you find a better method to do this without editing the core files, do share it here.
Laurence Cope says
I found how to do it properly this way:
https://www.dylanbarlett.com/2014/01/disabling-w3-total-cache-footer-comment/
No core files changed
Annapurna Agrawal says
Hi,
I want the W3TC footer. But i do not know for what reason, it doesn’t come for me. Can you please tell me why.