Continue..

This site uses cookies. By using this site without changing your browser cookie settings, you are accepting this. More information: privacy policy.

One Of My WordPress Sites Got Hacked (important lesson)

I got a shocking warning email from Google last Saturday… my site was distributing malicious code or “malware”, so it was now blocked.

HOW DID IT HAPPEN?

It’s clear I made some mistakes, but what was the CAUSE?

The setup on the host server? (it’s not my main host and they have since told me, they altered their server after my hacking report). Was it the WordPress software I was running? Or was it something else? (of no doubt hundreds of things, I don’t know about)

What I do know for sure, is several bits of nasty redirecting code were hidden in various places of my site, such as (for the techies amongst you) htaccess files and the wp-content, uploads and themes folders.

BUT HERE’S THE REALLY SHOCKING THING…

Even AFTER the first clean up, when I changed passwords for WordPress, FTP, database and hosting, they did pretty much the same hacks THREE MORE TIMES between Saturday and Monday.

I’m told they must have inserted some sort of “back-door” into the site, to use whenever they wanted.

To be honest, I’m still not sure if it’s all fixed and secure yet. I am hoping the server changes done by the hosting company will work, but it’s too early to say.

I DON’T WANT YOUR SITE TO GET HACKED…

So here are the key lessons I’ve learned from this and want to share. There’s two categories, PREVENTION and CLEANING.

To PREVENT, or more realistically REDUCE the chance of getting hacked:

1. Make sure you have updated your WordPress software, to the latest released version. (I had neglected the hacked site for some time – it was on version 2.8)

2. Set file permissions, particularly in the wp-content folder, to the most secure settings that will run on your server and still display your site. (755 is a good place to start)

These are both pretty basic, quite honestly. Search on Google and you will find LOADS more prevention tips, using properly clever stuff.

BUT WHAT IF YOUR SITE DOES GET HACKED?

(could happen sometime.. probably will)

You will want to be able to CLEAN it quickly and effectively (this is I think, the most important bit of this post).

You don’t want to have to fallback on cleaning individual files, like I had to. Instead, have a proper backup copy of ALL current files and folders, plus the WordPress database.

Here’s a video showing how to do proper backups…

http://websiteworkshop.net/members/backing-up-video/

You can then just restore your entire site from the backup and in one fell swoop, remove any “back door” nasties that might be hiding.

None of this is rocket-science.. it’s all rather boring (until you get hacked).

But PLEASE actually do it for your sites. If the worst happens, these boring steps will save a lot of your time and minimise loss of income.

Posted via email from kevinbrown’s posterous

New here? Don't miss the next. Get updates, how-to's and WordPress expertise by email (unsubscribe anytime)


We take your privacy very seriously (click for full policy)

Leave a reply