How to tell if your WordPress site has been hacked — and what to do first
How to tell if your WordPress site has been hacked: the common warning signs, what to do in the first hour, and when to call in a professional.
Published · updated
// short answer
Common signs of a hacked WordPress site are redirects to spam, admin users you did not create, unfamiliar files or plugins, and browser or Google warnings. If you see them, take a backup, change passwords and tell your host before deleting anything.
If you think your WordPress site has been hacked, the first thing to know is this: it happens to careful people too, and it's usually fixable. WordPress runs a large share of the web, so it's a common target. Break-ins often come through an out-of-date plugin, theme or password, not through anything you did wrong on the day.
This guide covers the signs to look for, the first steps to take in the first hour, and when it's worth calling in help.
Signs your site may have been hacked
Some signs are obvious. Others are easy to miss for weeks. Any one of these on its own isn't proof, but they're worth investigating:
- Visitors are redirected to another site, often a spammy shop or a fake prize page. Sometimes this only happens on mobile, or only for visitors coming from Google, so you may not see it yourself.
- Google shows a warning such as "This site may be hacked" in search results, or your browser shows a red "Deceptive site ahead" page.
- Strange pages appear in search results for your domain, often in another language or selling things you don't sell.
- New admin users you didn't create appear under Users in your WordPress dashboard.
- You can't log in, or your password has been changed without your knowledge.
- Your host emails you about malware, unusual resource use, or suspends your account.
- Your site sends spam, or your domain starts appearing on email blocklists.
- Files or code you don't recognise, such as unfamiliar PHP files in your uploads folder, or odd scripts added to your theme's header or footer.
- The site is suddenly much slower, or your hosting bill jumps because of traffic you can't explain.
What to do first
Work through these steps in order. They're about limiting harm and keeping your options open, not about fixing everything in one go.
1. Stay calm and write things down
Note what you saw, when, and on which device. Screenshots help. This is useful for your host, for anyone who helps you, and for deciding later whether you have obligations to tell anyone (see below).
2. Take a snapshot backup of the site as it is now
It sounds odd to back up a hacked site, but it matters. A full copy of the files and database, as they are, lets an expert look at what happened later. Most hosts can take a snapshot from their control panel. Keep it separate from your clean backups and label it clearly.
3. Change your passwords
Change, in this order:
- Your hosting control panel password.
- All WordPress administrator passwords.
- Your database password (your host can help, and the new one must also be updated in
wp-config.php). - Any FTP or SFTP accounts.
- The email account that receives your WordPress password resets.
Use long, unique passwords from a password manager, and turn on two-factor authentication wherever it's offered, starting with your hosting account and WordPress admin.
4. Check your admin users
In the WordPress dashboard, go to Users and filter by Administrator. Remove any account you don't recognise. If you're not sure about one, downgrade it to Subscriber rather than deleting it, and ask your developer.
5. Tell your host
Your hosting provider sees things you can't, such as server logs and malware scans. Many hosts have a security team or a clean-up service, and they may already know about a problem affecting other sites on the same server. Ask them what they can see.
6. Update everything
Update WordPress core, every plugin and every theme to the latest version. Remove any plugin or theme you don't use, including inactive ones: they can still be exploited. If a plugin hasn't been updated by its author in a long time, look for a maintained alternative.
7. Restore from a clean backup if you have one
If you have a backup from before the problem started, restoring it is often the fastest route back. Restore, then immediately update everything and change passwords again, because the weakness that let them in will be in the backup too.
If you don't know when the problem started, or you don't have backups, a professional clean-up is usually safer than guessing.
// free, passive, 30 seconds
Run a free passive check on your WordPress site
Do you need to tell anyone?
If your site collects personal information, such as contact forms, customer accounts or online orders, a break-in may count as a security compromise under data protection law. In South Africa, POPIA requires you to notify the Information Regulator and affected people when there are reasonable grounds to believe personal information has been accessed by someone without authority. Other countries have similar rules. Our guide on what POPIA means for your website explains the basics. It's general information, not legal advice, so speak to a lawyer if you're unsure.
How to make it less likely next time
Once things are back to normal, a few habits make a big difference:
- Keep everything updated, ideally with automatic updates for minor releases.
- Use fewer plugins. Every plugin is more code that needs looking after.
- Keep regular, off-site backups, and test that you can actually restore one.
- Use two-factor authentication for every admin account.
- Don't advertise your versions. WordPress and some plugins announce their exact version numbers in your page code. Hiding this (version disclosure) doesn't fix anything, but it makes your site a less obvious target when a new flaw is announced.
- Watch for news that affects you. When a popular plugin has a serious flaw, sites using it are often targeted within days. Knowing early gives you time to update.
That last point is where WordPress security monitoring helps. Odesstra keeps a record of what your site runs and tells you when something newsworthy affects it, in plain English. It's a service run by a person, not an app: book a short call to get started.
When to call a professional
Get help if any of these apply:
- The problem comes back after you've cleaned it.
- You handle payments or a lot of customer data.
- Google has flagged your site, or your host has suspended it.
- You simply don't have the time or confidence to do it yourself.
A good professional will find how the attacker got in, clean the site, close the gap, and ask Google to review the warning. Website security fixes from Odesstra are quoted per job, and nothing starts until you agree. If you're not sure where to begin, talk to a human. We'll tell you honestly whether it's something you can handle yourself.
For a broader routine to follow once the dust settles, see our website security checklist for small businesses.