My website got hacked: what to do first, and what comes after
Found your site hacked? The recovery sequence that works: recognize the signs, document everything, contain the damage, clean from a known-clean state, and request the right search review.
Finding out your website has been hacked ranks among the more frustrating moments of owning one. The way through it is a sequence, not a scramble: recognize the signs, document what you see, find the compromise, clean up, and only then ask search engines to trust you again. This guide walks that sequence, grounded in WordPress's hacked-site documentation and Google's Search team advice.
Recognize the signs
"Hacked" is an ambiguous word, and naming the actual symptom gets you better help faster. WordPress's documentation calls these symptoms indicators of compromise, and its list includes: your site blacklisted by Google or Bing, your host disabling the site, the site flagged for distributing malware, readers reporting their antivirus flags your pages, being contacted because your site is attacking other sites, unauthorized changes like new user accounts appearing, or a defacement you can simply see in the browser. Each points somewhere different, so note exactly which ones you have.
First hour: stay calm and document
WordPress's first two steps are unglamorous and correct: stay calm, then document. Write down what you are seeing that makes you suspect a hack, when you noticed it (with timezone), and what changed recently - a new plugin, a theme edit, a widget change. You are building the baseline of an incident report, and it will be valuable whether you handle the response yourself or hand it to a professional. Annotate your hosting environment too; it will be needed during the response.
Scan - the site and your own computer
Two kinds of scanners look for different things, and WordPress's guidance is that no single one is the best approach - application-level scanners (security plugins) and remote scanners (external crawlers) together improve your odds. Do not stop at the website: the same documentation warns that the infection often starts on the owner's own machine, where trojans sniff FTP and admin logins. Run a full antivirus scan on every computer that has ever logged into the site's admin or hosting panel, and consider a second scanner for stubborn cases.
Loop in your host
Check with your hosting provider early. On shared hosting a hack may affect more than your site, and your host may already be taking steps - or can confirm whether what you see is a hack or a loss of service. There is a second reason: when a hacked site sends spam, email blacklists can flag the server's IP address, which is often the same server handling your email. Your host is the party that can see and act on that.
Contain before you clean
Before changing anything destructive, limit the damage and preserve what happened. If the site is actively serving malware or phishing pages, taking it offline or into maintenance mode - with your host's help if needed - protects visitors while you work, at the cost of some downtime. Preserve evidence before wiping: the notes from your first hour, server logs and copies of suspicious files are how you learn where the attackers got in, and once you restore over them they are gone.
Clean from a known-clean state
Scanners find problems; they do not by themselves repair them. The durable fix is restoring files and database from a backup you know predates the compromise - or rebuilding cleanly - and then closing the hole that let the attacker in, whether that was outdated software, a weak password or something the scans identified. Reset every credential that touches the site, and do it from a device you have scanned and believe clean: changing passwords from an infected machine can hand the new ones to the attacker. Remove any users, sessions or access keys you did not create.
Rebuild search trust
If Google flagged the site, clean code is not the last step. Two different Search Console reports can be involved, and they work differently: the Security Issues report lists Google's findings when a site is hacked or could harm visitors, and once every listed issue is fixed on every page you select "Request Review" there; a manual action, issued by a human reviewer for spam-policy violations, lives in the separate Manual actions report with its own reconsideration request. Google says these reviews can take several days or weeks, and warns that requesting a review before the problem is actually fixed slows things down. A successful review lifts the flag - it does not promise where pages rank afterward. Then harden for the next attempt: our guides on admin account security, backups, and web application firewalls cover the layers that make a repeat less likely.
FAQ
How do I know it is a hack and not an outage?
Start with the indicators above - unauthorized users, visible defacement, blacklist warnings are hack-shaped, while a plain "site down" is not. Your host can help confirm which you are facing, as WordPress's documentation notes.
Can I clean a hacked site myself?
Often, with a known-clean backup, updated software and patience - but not always. The documentation you gathered in the first hour is what makes professional help faster and cheaper if you need it, so it pays off either way.
Will Google trust my site again?
That is what the two review processes are for. If the Security Issues report flagged your site, fix everything it lists on every page and request the review there; a manual action instead uses the Manual actions report's own reconsideration request. Google says reviews can take days to weeks, and a successful review clears the flag - it does not guarantee where your pages rank afterward.
How do I stop it happening again?
Keep software updated, use strong unique passwords with MFA on admin accounts, give people only the access they need, keep tested backups, and consider a web application firewall - our linked guides cover each one.