Ok…. this happened months ago now… I’ve been a bit busy! Most of this post was written straight afterwards though, and it’s a bit of a ramble.
To cut a long story (the first bit of the story!) short: Google took EnjoyPerth out of their index on 16 October. I couldn’t see anything wrong. There wasn’t a message in Webmaster Central, and no one on the Webmaster Help Group could see anything wrong. Eventually figured it must be the Text Link ads I was selling in the footer. Wanted to wait till end of the month to take them out, so I still got paid…
Duncan Riley posted about my issue on TechCrunch on 29 October, after we chatted about it at Podcamp Perth. The article was about Google penalizing sites for selling text link ads, and the fact that we rely so much on Google, which obviously isn’t good (at least 80% of my hits come from Google).
But then someone in the comments spotted there was a whole heap of hidden spam links in the footer of enjoyperth! It had been hacked, and probably weeks earlier. That would explain why the google bot decided not to index it! Unfortunately the google bot didn’t let me know, there wasn’t a message in Webmaster Central! :(
Anyway, at least that solved the mystery why this all started. And the post even got Matt Cutt’s attention! If we removed those links and filed a reinclusion request, we should be back in the index soon! Phew!
It was about 11pm at this stage, but Pascal found the links in the mail-class.php file, in the wp-includes folder. And there was another bit of code in the general-template in the same folder. He removed all that and the links were gone.
But, the following afternoon at around 2pm, another comment on the TechCrunch posts alerted us to the fact that there were hidden spam links in the footer again!!
All through this time I’m getting a lot of support, help and tips from friends! Long live twitter, heh!
A few people had suggested upgrading to 2.2.3 first (hadn’t done it yet, cause needed sleep, and have a day job!), so that’s what I did (though I tried replacing just that class-mail.php, without consulting anyone first, and I think that may have messed things up more…)
So I backed everything up.
Removed class-mail.php in wp-includes folder. Fatal error. Inserted class-phpmailer.php from new wordpress download. Still fatal error. Put backup of class-mail.php (with the spam links still in it) back in. Still fatal error. (ok, so it was a long shot, but I thought it couldn’t hurt, and I could just put the file I backed up back. But that obviously didn’t work).
Went ahead with upgrade. Deleted everything except config file and wp-content. Upgrade successful, can see header etc again. But still fatal error and no content.
The fatal error was < ?php if (ls_getinfo(”isref”)) {?> on line 28 in index.php in the 3k2 theme file. That messed everything up. So I went back and deleted that and the whole bit underneath it, which was the code for the Landing Sites plugin.
Now the home page was alright, but individual posts were messed up, because the footer was missing from them. I finally figure that the code for the Related Posts plugin is messing that up on the single posts. So deleted that code.
A day later I checked the kids.enjoyperth.net site (which I don’t update..), and that had the same issue, so upgraded that too. My other blogs (not sub domains of enjoyperth) are fine.
I’ve enabled most of the plugins again (after upgrading to the latest version), but haven’t bothered with the Landing Sites and Related posts ones. Maybe one day when I find more time and motivation I’ll look at them again.
So that’s it. Just upgrading to 2.2.3 made the spam links disappear!
I still don’t know how this all could have happened in the first place, and I still need to upgrade to 2.3…
Aside from that, all’s well that ends well I guess. Within a day I was back in google though have gone from a pagerank 4 to 2 (but seem to be in the same position in results (or even higher), and am getting more hits than ever (though that’s just the normal growth I think)).
So I think that’s it! Thanks to everyone for their support, especially Duncan/ Techcrunch, Kay, Skribe, Kate, Matt, Grum and Myles!
And thank you to Google for getting EnjoyPerth back in the index very quickly, though I do hope you can get your webmaster notifications working better, so webmasters know what’s wrong when their site is taken out of the index!