How to tell if your WordPress site has been hacked – and what to do
A hack isn’t always visible. Here are the signs that a WordPress site has been hacked, and what to do – in the right order – when it has happened.
Many people think a hacked website is obvious right away, with a black page and a message from whoever broke in. That’s rarely what it looks like. Usually the person who got in wants you not to notice anything, so the site can be used for as long as possible.
Signs that your site may have been hacked
- Visitors are redirected to other sites – sometimes only those coming from Google or visiting on a phone, so that you as the owner don’t see it.
- Fake “verify that you are human” boxes asking the visitor to copy and paste something or download a file. It’s a common way of spreading malware to visitors’ computers.
- Unknown administrators under Users in WordPress.
- Plugins you don’t recognise, often with names that look technical and harmless.
- Strange search results: if you search for
site:yourdomain.comon Google and see pages about pharmaceuticals, casinos or in a foreign language, that’s a clear sign. - Warnings from Google Search Console, your browser or your hosting provider.
- Email from your domain lands in spam or bounces.
What to do when it has happened
The most important thing is not to just remove what you can see. Whoever got in almost always leaves a back door so they can come back. Do this, in this order:
- Take a copy of the site as it is now, files and database. You need it to understand what happened, and in case something goes wrong during the clean-up.
- Change all passwords: WordPress administrators, hosting, FTP/SSH and the database. Also change the password for the email account connected to the administrator.
- Remove unknown administrators and check the permissions of the remaining users.
- Log everyone out by changing the security keys in
wp-config.php. Old logins then stop working. - Replace WordPress, themes and plugins with clean copies from official sources, and remove anything you don’t recognise or don’t use.
- Look for code left behind in the uploads folder and in the database, where malicious code likes to hide.
- Find out how they got in – an outdated plugin, a leaked password or a weak login – and close that door.
- Request a review from Google in Search Console if the site has been flagged.
How to reduce the risk of it happening again
- Keep WordPress, your theme and plugins updated. Read more in Why do you need to update WordPress?
- Use unique, long passwords and two-factor authentication for all administrators.
- Only give administrator access to those who really need it.
- Have automatic backups stored outside your hosting account.
- Only install plugins from known sources, never “free versions” of paid plugins.
A stolen password is as common a way in as a security hole. Two-factor authentication stops most of it.
Need help?
I have cleaned up WordPress sites after hacks, from fake plugins to back doors left behind. Think your site has been hacked? Contact me and I’ll take a look.
Need help with your website?
I build, update and troubleshoot WordPress and Webflow websites for companies and agencies. Tell me what you need and I’ll get back to you.
Why do you need to update WordPress – and what happens if you don’t?
WordPress updates are mostly about security. Here’s what gets updated, what happens if you skip it and how to update without breaking your site.
Read moreWordPress or Webflow – which is right for your business?
Both are good tools, but for different needs. Here are the differences in ownership, maintenance, flexibility and e-commerce – and how to choose.
Read more