Finding out your WordPress site has been hacked is stressful, especially if customers are seeing it. The good news is that almost every hacked WordPress site can be cleaned and recovered. What you do in the first hour makes a big difference to how quickly that happens, and to whether the hacker can get straight back in.

Signs your WordPress site has been hacked

What to do in the first hour

1. Don’t delete everything or restore blindly

It is tempting to wipe the site or restore last week’s backup. Hold off for a moment. The hacker may have been in for longer than you think, so recent backups can contain the same infection. Keep a copy of the site as it is now: it is the evidence of how they got in.

2. Change every password, from a clean device

Change the passwords for all WordPress administrator accounts, your hosting account, SFTP/FTP, and the database (updating wp-config.php to match). Do this from a computer you trust, in case the original breach came from malware on your own machine.

3. Remove users you don’t recognise

In WordPress, go to Users and filter by Administrator. Delete any accounts you didn’t create, and check the others still have the email addresses you expect. Creating a hidden admin is one of the first things attackers do.

4. Log everyone out

Changing passwords doesn’t end sessions that are already logged in. To force everyone out, replace the security keys (“salts”) in wp-config.php with a fresh set from the official generator at api.wordpress.org/secret-key/1.1/salt/.

5. Protect your visitors

If the site is redirecting visitors or serving malware, consider putting it into maintenance mode, or ask your host to take it offline temporarily while you clean it. That protects your customers and limits the damage to your reputation with Google.

6. Scan the site

A security plugin such as Wordfence, or an external checker such as Sucuri SiteCheck, will often find infected files. Treat a clean scan with caution, though: scanners miss well-hidden code, so it isn’t proof the site is clean.

How to clean a hacked WordPress site properly

Removing the obvious malware isn’t enough. Hacked sites usually have a “backdoor”, a hidden file that lets the attacker back in after you clean up. A thorough clean-up covers:

After the clean-up

Want it cleaned up for you?

Page Guard’s London-based developers clean hacked WordPress sites, close the security hole, and help get Google warnings removed. The diagnosis is free, one-off fixes start from £55, and if we can’t fix it you get a full refund. See how we fix hacked WordPress sites, get emergency WordPress support, or call 020 3376 1925.

Already back online? Our WordPress maintenance plan includes daily security scans, backups and updates, so you aren’t caught out again.

Leave a Reply

Your email address will not be published. Required fields are marked *

This website uses Cookies

This website uses Cookies to improve your web experience.