Guides › WordPress › Security & hacks

Hacked WordPress Site: What to Do First

Redirects, strange pages or a Google warning? Contain the damage, change every password, restore clean files and close the way in.

Reference guide. This guide is written from established practice and the official documentation of the tools involved. We have not yet tested every step on a live demo site. Back up your site before you change anything.
Security and hacking

Common signs: visitors are sent to other sites, strange pages appear in Google, unknown admin users exist, your host suspended the site, or a browser warns visitors.

1. Stay calm and make a copy

If you can, download a copy of the site and database before changing anything. It helps to find out how the attacker got in.

2. Contact your host

Many hosts scan for malware and can tell you which files are infected. Some will restore a clean backup.

3. Change every password

Change them from a clean computer:

4. Restore from a clean backup

The most reliable fix is to restore a backup from before the hack. Then update WordPress, all plugins and the theme straight away, because the old versions are probably how the attacker got in.

5. No clean backup? Clean by hand

6. Close the way in

7. Clear the warnings

If Google flagged the site, request a review in Google Search Console after cleaning.

When to get help

If you cannot find the infection, or it keeps coming back, hire a specialist. Contact us if you want help.

Related guides

Did this solve it? If not, email hello@sitefixlab.org with the exact error text and we will look into it. Try the problem finder.

Last updated 2026-11-21.