Afrog Nuñes
Afrog Nuñes

Reputation: 558

W3 Total Cache: everything removed and plugin still affecting the site

I'm facing a bizarre problem with the W3 Total Cache plugin in Wordpress.

I'm using Wordpress 4.6.1 and the 0.9.5.1 version of that (censored) plugin. I only discovered my WP version is incompatible too late - it is not compatible with 4.7 and faces issues with my version too...

Since our customer received an email from our host alerting about "slow queries", and since it already had the W3 Total Cache plugin (probably installed together with other plugin or the theme), we enabled "Page cache", "Database Cache" and "Browser Cache".

So the problems started: a few days after this, I was able to edit a page, but another few days and the page edit page goes to a white screen of death/error 503 - and I was not the only person to have this problem! Funnily, the edit posts page seems to behave normally.

After an internet search, I followed this tutorial to get rid of this plugin, since it spreads files and code in many parts of the site. For many people it solved the problem - but not for me! Even after that, the page edit page still goes blank, and the images and js/css links are still cached, even if the plugin AND the cache files were deleted, the htaccess is normal (only the wordpress code there), and there are none of the plugin traces around the site. For example, in a image I still get something like that (look the cached src):

<img class="alignnone size-full wp-image-4844" 
    src="wp-content/uploads/2016/09/xphoto.png.pagespeed.ic.m2asf09saf.png" alt="photo"
    srcset="http://www.example.com/wp-content/uploads/2016/09/photo.png 990w, http://www.example.com.br/wp-content/uploads/2016/09/photo-300x60.png 300w, http://www.example.com.br/wp-content/uploads/2016/09/photo-768x153.png 768w" 
    sizes="(max-width: 990px) 100vw, 990px" width="990" height="197"
>

Another one:

<img src="/wp-content/uploads/2016/09/xphoto2-400x400.jpg.pagespeed.ic.sj83Hr32Yh.webp" alt="" 
    data-pagespeed-url-hash="1923713827" 
    onload="pagespeed.CriticalImages.checkImageForCriticality(this);"   
    style="opacity: 1;"
>

I did a search on my MySQL database to find the "pagespeed" term (since the plugin adds it to most images and css/js links) and nothing... Another search inside the folders and nothing too. I contacted my host service and they also don't know what happened, since the code is now without the plugin, and also there seems to be nothing inside the database. Cleaning browser cache and cookies do nothing too.

According to them, varnish is off (I don't know anything about varnish, but they said it a way to cache php files). I can't think of any explanation of why it puts these unexisting codes in the site except as something being somewhat cached in the RAM memory of the server. And the host company said they can't restart the server because it is a shared server (so other sites from other customers are there)...

So, my question is how come this plugin still affects the site if it is no more in the site codes? And, of course, how to solve this problem?

EDIT: I talked again with my host company, and they said mod_pagespeed is off too. Also, they said the server cached for 40 min, instead of more than 24 hours as happened with my site. So it's probably a technical problem with the server.

Upvotes: 0

Views: 2855

Answers (1)

Afrog Nu&#241;es
Afrog Nu&#241;es

Reputation: 558

Well, in the end I was able to discover what happened and solve it, so I'll post it in the hope that this can be helpful to someone with the same problem. The problem is that google mod_pagespeed - the feature which adjust my code to theoretically improve the speed of my site - was actually ON and so the host company got the information wrong. While caching could be useful, I was not only seeing no speed improvement than also other pages were still being affected by this feature, and so I was with problems to update sliders and other plugins which depend on images.

The solution is simple: just go to the Control Panel of your host, find the Google PageSpeed option (or something similar) and disable it.

About Varnish: it was not causing this problem, so I was able to maintain it working (after all disabling it by the same control panel still let the site show the images with the pagespeed code). So you don't need to disable Varnish.

Upvotes: 0

Related Questions