Recovering from a WordPress Hack

Last night I had the unpleasant discovery that this site’s WordPress had been “hacked”, with every post redirecting to an uploaded “this site has been hacked” variety of HTML file. I looked back and realized it happened on March 1st and mad at myself for not noticing sooner.

Fortunately it was pretty easy to clean up by zapping the database and restoring from a good backup (thankfully I have daily backups running).

The harder part is going to be recovering in Google’s view. Search queries as shown in Google Webmaster Tools dropped like crazy right away:

Search queries chart from Google Webmaster Tools
Search queries chart from Google Webmaster Tools

And here’s the corresponding crawl errors view:

Crawl Errors Chart from Google Webmaster Tools
Crawl Errors Chart from Google Webmaster Tools

Hopefully after a little time the Google crawler will see all those pages returned, but I’m guessing whatever page rank I had will be very slow to recover (if it ever does). In the meantime I’ve improved my WordPress security a bit more, updated to the latest of everything, and removed a few unused plugins. Next will be to set something up to notify me more quickly if this happens again.