I used w3 total cache on my Multisite install.

For a reason I didn't understand, I was hacked, and when someone was going to one of the website, the visitor was redirected to porn websites. Only on mobile devices, not on standard computers.

I removed w3 total cache, deleted the cache folder, etc. and the bad redirections disappeared.

However, now, when someone is visiting one of the websites, the content is correct but the CSS is not loaded. So the websites look ugly.

Did I miss to clean something after w3 total cache removal ?

You can have a look at the problem on at http://libre-factory.com

  • Redirects of this kind happen mostly because of faulty file permissions. and some hashed code is inserted, a lot of times only on certain redirects from for example google or facebook. But it could also trigger several devices so it takes you longer to notice the 'hack'. Make sure your file and directory permissions are correct and safe. Conceringing the css issue I would recommand to 'start' over with a clean install and no cache, make sure it works like that and then recreate your cache. Good luck
    – woony
    Commented Dec 19, 2013 at 11:08

1 Answer 1


After investigation and talking with some sysadmin friends, it happened that there was a .htaccess with rewrite rules for mobile devices in the root of Wordpress, in wp-content and in all folders in themes and plugins.

I removed all the .htaccess, refresh the root .htaccess with only wordpress needed stuff and everything is good now.

I really think it was a security issue with W3 Total Cache, however, I won't try to reproduce it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.