What To Do If Your Blog Gets Hacked

What To Do If Your Blog Gets Hacked

Today I want to talk about what to do if your blog gets hacked. When I say ‘if’, what I really mean is ‘when’, because honestly, it’s going to happen. It happens so, so often, and I feel like I really need to share some advice on this topic. In the last few weeks, I’ve worked pretty solidly to clean up and restore at least three hacked websites and I’m noticing a worryingly similar pattern. Be warned, this is a long (but important) read.

Security. Or lack thereof. Actually, not just that, but a lack of maintenance, which is something that really needs addressing to help keep us all safer online.

But first, a disclaimer. I’m no expert on these things, but I have learned a lot about keeping websites secure over the last few years. I’m also very lucky to have a web developer expert pal to run things past when it goes too far west for me to keep up with. So in short, I’ve spent a lot of time in the front and back end of WordPress over the last five years or so, and I’ve seen this happen multiple times.

Why does this matter?

The reason I’m writing this is not to put out some kind of thinly veiled advertorial of my services (although, you know, please hire me). I’m writing it because there are some great creators out there who are simply considering pulling the plug on their work because they’re being targeted by hackers so often.

That’s a shame. It is a hard thing to get your head around, and to be fair, not every blogger actually wants to. But if you have a website, I’m afraid that’s not really an option. You have to get better at this stuff if you want to keep control of your hard work.

More importantly, allowing your blog or website to become susceptible to hackers because of your own ignorance around security is really dangerous. You might think that sounds harsh but think about it like this. You may have the contact details of hundreds of subscribers logged in to your website. They’ve given you consent to process their data via GDPR. If a hacker gets in and steals all of that information for their own use without your knowledge, who do you think is to blame for that?

Yep. You are, and that’s just the tip of the iceberg of risk here.

So today I’m going to share some advice on what to do if your blog gets hacked, and what you need to know to stop it from happening again. Buckle up, because this is going to be jam-packed with some hard truths. I apologise if any of this comes across as a bit patronising. However, I’ve worked with a lot of bloggers who, understandably, really do struggle with this side of things. Hopefully, this post will help empower people to get more proactive about their WordPress security.

What to do if your blog gets hacked

What to do if your blog gets hacked

Firstly, how do you know if your blog has actually been hacked? Well, a good indicator is usually that your readers start noticing pop-ups or links taking them off to third-party sites. Sometimes it could be a pop-up that looks like ‘allow notifications’, sometimes it could be a redirect to a completely different page altogether. Put it this way, if there are strange things happening in your website that you didn’t put there yourself, then chances are you’ve been hacked.

If you suspect hacking, the first thing you should do is reach out to someone you know who can investigate it for you. Not tooting my own horn here, but if you’re concerned about this at all, drop me a message and I can have a quick look for you.

If you’d rather do it yourself, then a good place to start is with a basic site check from an external scanner such as Sucuri. You can run your website through this tool at https://sitecheck.sucuri.net/ and you’ll get an instant answer as to if and how badly you’ve been hacked.

If it’s not looking good

Once you’ve ascertained that your site is compromised, what comes next?

I want you to grab a strong coffee and bear with me. Your website isn’t beyond repair (hopefully), but before we start you need to take a good look at some things. First on your to-do list is to make a backup. If you have a backup plugin installed, use it now and keep that file on your computer. If you don’t, you should be able to get one from within your hosting control panel. If you’re still not sure, ask your host.

You might not need a backup plugin if your host has regular backups enabled within the control panel, so if in doubt, ask them. Usually, you’ll be able to tell by accessing your control panel and looking for something like ‘database backups’, ‘file rollback tool’ or ‘directory backups’, but if you’ve never done that or have no idea how the best thing to do is reach out to someone who can help you.

The next thing is to check on your updates icon. If you look up in the top left corner of your WordPress dashboard, you’ll see the cycling arrow updates icon. How many do you have pending?

Updates

I can’t stress enough how important it is that you keep on top of these updates. Nine times out of ten, hackers find their way into your blog via an out-of-date plugin or theme. Think about your whole website like this and hopefully, it will start to make sense.

Imagine that your website is a car. The parts of your car are as follows:

  • Database – this is your car’s engine, without it, your car won’t work at all
  • Files (posts and photos etc.) – these are all of your car’s interior, they look smart and make up the inside of your car – without them, your car will work, but it’ll look and feel a bit flat
  • Themes – these are your car’s body/exterior, they make your car look all slick and shiny but they need to be kept clean and free of chips, dents and bird muck (see where I’m going here?)
  • Plugins – these are your car’s tyres, they help your car to run smoothly, but if you don’t maintain them regularly, they get punctures in them. Then, if you keep driving on knackered tyres, a whole load of unwanted crap gets sucked up into the inside…and eventually, they burst and your car grinds to a halt.

It is vital that you maintain your car’s body, tyres and interior at the very minimum. It’s absolutely fine if you don’t want to touch the engine, you’re better off leaving that to an expert anyway, but those three things you need to try to keep on top of.

 what to do if your blog gets hacked

How to keep your car working properly

Every time you log in, check for updates. If you see the update arrows in the top left corner, update immediately. Always, always, always prioritise plugin and theme updates. It’s so important and is one simple way to keep attackers out.

Next, you need to review your choice of themes. Not all themes are as secure and safe as you might think. Everyone’s different, but personally, I would never buy an externally made, third-party theme. By that I mean ones you can buy outside of WordPress, i.e. off Etsy or from another website. The reason for this? Lack of updates. Lack of security testing.

Not all themes are equal

When a theme is uploaded to the WordPress repository, it has to go through a rigorous set of testing before WordPress will allow it to be released into use. The themes you can download from the WordPress library have all had to meet the required security standards before being declared fit for use. A third party or external theme does not. Another thing about using pre-bought or external themes is that once you’ve uploaded and unzipped it, that’s usually it.

External themes don’t tend to come with additional updates. As time goes on, your theme’s quality and security will naturally depreciate, because it was sold as-is at the point of purchase, without additional support for updates. You’re essentially driving a car with paintwork that might look shiny and slick for the first few months, but after a year, two years, or longer, the chips are starting to show and the bird muck is seeping into the cracks.

WordPress themes are updated as frequently as their developer releases new ones. You can always be sure that your car’s paintwork looks shiny if it’s being regularly cleaned up and improved by the person who sold you the car in the first place. That’s what you get with a guaranteed WordPress theme, that has come through WordPress itself.

Please don’t buy external themes. They might look pretty but in the long run, they’re going to cause you a ton of grief, especially as the hackers start to spot chinks in your paintwork.

Remove anything that hasn’t been updated in the last few months

By now you’re hopefully getting an idea of why regular maintenance is so important when it comes to preventing blog hacks. But, we’ve already crossed into hacker territory, so let’s start with some fixes.

Go into your ‘Plugins’ tab and look at how many you’ve actually got. When were they last updated? If you’re not sure, you can click on the ‘view details’ option and it’ll tell you on the popup screen when they were last updated by their developer. Anything that hasn’t been updated in the last year, bin. I don’t care if it’s something you think you can’t live without. Bin it. You can always find a more up-to-date replacement.

Would you keep driving a car with punctured tyres?

The same goes for themes; anything you aren’t actually using on your live site needs to be deleted. If you leave them in, they’ll become susceptible to hackers. Keep your blog lightweight and up-to-date at all times.

What to do if your blog gets hacked

Get rid of all your spam comments

They’re like a breadcrumb trail for hackers. If you leave them in your spam section but never actually delete them, they’re still there, waving a big flag to hackers who look for vulnerable targets. If you’re not sure whether or not a comment is spam, make sure you’re using a decent, up-to-date spam detection service (not necessarily Akismet) to keep it all cleared out.

If you have to go through and check them all manually, that’s what you have to do. You need to clean everything, thoroughly.

Check your uploads

One of the places that hackers like to put their malware codes is in the uploads folder of your website. One way to check if they’ve done this is to look in your media library and check what’s in the description or caption boxes. If they’re empty, that’s good, if not, there’s some work that needs doing.

The same goes for your posts. This might be trickier to spot, especially if you’re a blogger who likes to use Classic Editor. Personally, I can’t stand it, but each to their own. For this, you might need to check via the ‘source code’ option in Classic Editor, or by checking the post in the text editor rather than the visual composer. If you can see some dodgy-looking scripts at the bottom of your posts that you didn’t put there, you can expect them to be in every post and page you’ve got.

From here, you might start to think this is going to be an absolute mountain to climb, and you’d be right. However, it is fixable, so don’t panic. Your best bet is to get someone who knows what they’re doing to help you, but there are some steps you can take to make things better from here.

Install and run your security plugins

If you don’t have these enabled, then do so. Now. Install and activate Wordfence as a matter of priority and run a site scan. It will pick up any malicious files straight away and give you options to repair or delete them. Go through each of these slowly and carefully and make sure you don’t delete anything that you actually need. Again, if you’re unsure, ask for help.

Next, you need to locate the backup you made earlier. Check it’s still there. Yes, it’s got all the hacked files in it, but if anything goes wrong while you’re trying to fix things, at least you have a point to restore things from.

Run the scan and configure the Wordfence firewall. Make sure you read all the documentation on Wordfence’s firewall and blocking settings to make sure you tighten everything up as best you can. When you’ve finished doing that I want you to go to your ‘Users’ tab and delete anybody and everybody except for your own administrator account.

Change your passwords

I cannot tell you how many times I’ve helped people out with their websites and their passwords have been so basic that it’s frightening. For the love of God, use strong passwords. Encrypt yourself, protect your life. It’s SO much safer to have a gobbledygook password than anything ‘memorable’. You’re also going to need to add 2FA to your login page when you’re done, but you can do that via Wordfence’s login settings once we’re all finished.

Password security is really important and so often overlooked. I’m going to take a quick detour into why this matters at this point, just to reiterate why I get so stressed about it.

Let’s say you’re a parenting blogger. You regularly blog about your family life. You talk about your kids a lot. You have photos of your kids on your website. You share updates on their birthdays and you talk about soft play centres in your local area. How hard do you really think it’s going to be for someone to crack your blog if your password consists of ‘child 1’s name + birthdate, child 2’s name + birthdate’? Or ‘all our initials put together + my birth year’? Honestly, you’ve got to get smarter here.

Now I want you to imagine your lovely parenting blog has been infiltrated by someone who’s somehow managed to crack said password. Just like not all themes are equal, not all hackers are equal.

Some like to put spam code in. Some like to put third-party links in. Some link to prescription medications and some link to pet products. Some like to browse your photo collections. Some like to put porn links in your photo collections. Your photo collections with your actual KIDS in them.

Now, do you see why you need to wake up and take this stuff much, much more seriously?

But what could they possibly want with my little old blog?

See above. See ALL of the above. These people want your information. They want the details of the people you work with, your site visitors and your entire photo collection. They want to compromise your visitors’ data privacy and make you liable for a sanction as per GDPR. They want access to your passwords, your carefully cultivated imagery and the content you’ve worked so hard to create.

Mostly, they want to hide really bad, often illegal stuff right under your nose. Right on the photos of your babies.

Are you paying attention now?

Ok good. Main things to remember here:

  • Don’t panic
  • If in doubt, reach out to someone that you trust to help you
  • Ask your host, but be aware that not all of them will be able to help you with this – they’re hosts, not security providers
  • Backup your stuff as soon as you can
  • Delete any old themes and plugins you’re not using
  • Do another backup
  • Don’t panic

Time to take stock

That’s a lot of information, but if nothing more, go and check your updates list. Let me know your thoughts in the comments, and if you have any questions I’ll do my best to answer them.

I also want to apologise a bit if any of this has made me come across as being judgemental. I totally understand that all this might never have crossed some people’s minds. But the thing is, as much as I value the work, I don’t want to be locating and deleting dark web porn links on the photos of your children in the first place. I want us all to get smarter and work harder to stamp these creeps out.

Anyway, please make sure you take an hour to really look at your website’s security at some point soon. And please, go and change all your passwords.

1 thought on “What To Do If Your Blog Gets Hacked”

  1. Oooo such good tips! It’s awful to think some blogging are calling it a day because of regular hacking. It’s beyond frustrating when dealing with blog problems, let alone hacking. Got a funny issue at the moment with a firewall and my blog host provider claim they’ve resolved it, yet I’m still having people telling me they can’t access my blog at all. When it comes to hacking, and even issues like I’m having at the moment, a lot of the time you probably don’t even know about it until/unless someone tells you something odd is going on. It definitely pays to be mindful. And totally agree on updating all the software/themes/plug ins. The Wordfence firewall is a new one to me, will have to Google that (in case you can’t tell, I’m not that techie with blog jazz!)
    Caz xx

Comments are closed.

Scroll to Top