Most hacked websites don’t announce themselves. There’s no ransom note on the homepage. Instead, a customer mentions a strange redirect, Google starts showing a warning, or your emails stop arriving. By then the problem has often been there for weeks.
The recent PHP2Shell vulnerabilities were a reminder of how quickly things can change. Here’s how to tell if your WordPress site has been compromised, what to do straight away, and how to make it much less likely to happen.
Ten warning signs
Any one of these is worth investigating. Two or more together, and you should assume something is wrong.
What visitors notice
- Strange redirects. Visitors land on spam, gambling or fake prize pages, often only on mobile or only when arriving from Google. That’s why you might not see it yourself.
- A browser or Google warning. Chrome shows a red “dangerous site” screen, or Google search results say “This site may be hacked”.
- Pop-ups or adverts you didn’t add. Especially ones that only appear sometimes.
- Odd links or text in your pages. Hidden links to pharmacy or casino sites, often in the footer or visible only in the page source.
What you notice
- Admin users you don’t recognise. Check Users in WordPress for anyone with the Administrator role you didn’t create.
- You can’t log in. Your password suddenly doesn’t work, or your account has disappeared.
- Unfamiliar plugins or files. A plugin you never installed, or files with random names in your WordPress folders.
- The site is suddenly slow or keeps crashing. Hacked sites are often used to send spam or attack other sites, which uses up your server’s resources.
What your tools tell you
- Google Search Console reports a security issue. It’s free, and it’s often the first place a hack shows up. Look under Security & manual actions.
- Your emails start bouncing or going to spam. If your server is sending spam, email providers start blocking everything from it, including your real messages.
Quick checks you can do now
- Search Google for your site with
site:yourdomain.co.uk. Look for pages you don’t recognise, especially in other languages or about pills, gambling or loans. - Check your users in WordPress and remove anything unfamiliar (but read the next section first).
- Run the site through a free scanner such as Sucuri SiteCheck or Google’s Safe Browsing site status tool.
- Look at your site on your phone, using mobile data rather than your Wi-Fi, and arrive from a Google search rather than typing the address.
If you think you’ve been hacked: the first hour
Don’t panic, and don’t start deleting things at random. Removing the visible damage often leaves the hidden backdoor that let the attacker in, and they’ll be back within days.
- Change every password. WordPress admins, hosting account, FTP or SFTP, database, and the email account linked to the site. Use a password manager and make each one unique.
- Tell your host. Good hosts can confirm what’s happened, check server logs and, in many cases, restore a clean backup.
- Don’t delete anything yet. You may need the evidence to work out how they got in.
- Take a copy of the site as it is now, separate from your normal backups.
- Find your last clean backup. If you know roughly when the problem started, a backup from before that date is your quickest way back.
- Get help if you’re not sure. A proper clean-up means finding the way in and closing it, not just tidying up what’s visible.
Once the site is clean, you’ll need to request a review in Google Search Console if Google flagged it. Warnings won’t disappear on their own.
How to stop it happening
Most WordPress hacks don’t come from clever attackers targeting you personally. They’re automated, scanning thousands of sites for known weaknesses. These steps close off almost all of them:
- Keep everything updated. WordPress, plugins, themes and PHP. Most hacks exploit problems that were already fixed in an update the site never installed.
- Remove what you don’t use. Deactivated plugins and old themes can still be exploited. If you’re not using it, delete it.
- Use strong, unique passwords and two-factor login for every admin account.
- Give people the access they need, no more. Not everyone needs to be an Administrator.
- Use a firewall in front of your site. We put our clients’ sites behind Cloudflare, which blocks a lot of attacks before they reach the server.
- Take daily backups and keep them somewhere else. A backup stored on the same server can be lost with the site.
- Use good hosting. Managed WordPress hosting with monitoring catches problems early.
How we look after our clients’ sites
Every site on our managed hosting gets daily backups, kept for 30 days, plugin updates tested on a staging copy before they go live, automatic SSL and monitoring around the clock. When PHP2Shell was disclosed, our clients’ sites were protected [within hours] without them having to do anything.
Worried about your site?
If you’ve spotted any of the signs above, or you’d just like someone to check, get in touch. We can investigate, clean up a hacked site and put the protection in place to stop it happening again
