If you are reading this during the event: nothing here needs to be done in the next five minutes except taking the site offline. Everything else goes better slowly. The most expensive mistakes in a website hack are all made in the first hour, in a hurry, with good intentions.
First, confirm it is real
A surprising number of emergencies are not one. Before anything else, rule out the ordinary explanations:
- An expired SSL certificate produces a full-page browser warning that reads, to most people, exactly like a hacked site. Check the renewal date first.
- A plugin or theme update gone wrong can blank a site or scramble a layout. If it broke immediately after an update, that is almost certainly what it is.
- A domain or hosting bill that was not paid will take a site down or park it on an advert.
- An email claiming you have been hacked, demanding payment, with no evidence beyond an old password from somebody else’s breach, is a mass-sent scam. Check the site before you believe the email.
Real signs are different: pages you did not write, visitors from Google being redirected while you see nothing wrong, a Google warning in search results, your host suspending the account, or administrator users you do not recognise.
The first hour, in order
Put the site into maintenance mode
Not deleted, not reverted - offline, behind a holding page. This stops visitors being harmed, stops Google indexing more of it, and stops the damage growing while you work.
Write down what you can see
Screenshots, the exact addresses of any bad pages, the time you noticed, what first made you suspicious. In an hour you will have changed things and this will be the only record of how it started.
Call your host before you change anything
They see this daily, they hold the server logs that say when and how it began, and they know which backups exist from before the infection. Changing files first makes their logs harder to read.
Work from a computer you trust
If the first thing compromised was your own laptop, every password you type into it now is also taken. If there is any doubt, use a different machine.
Change the passwords, in the right order
Email first, because it can reset everything else. Then hosting, then CMS admins, then FTP and SFTP, then the database. Any password used in two places is now gone in both.
Check your email account itself
New forwarding rules, unfamiliar signed-in sessions, a changed recovery address. A quiet forwarding rule outlasts every password you just changed, and almost nobody looks.

Do not delete anything yet
This is the single most common mistake and the reason sites get hacked twice.
The files the attacker left are the only record of how they got in. Delete them in a hurry and you have removed the symptom and kept the cause: the out-of-date plugin, the open account, the form that accepted too much. All of it is still there, and the same automated scan that found you in March will find you again in April.
Taking the site offline already protects your visitors. That buys you the time to find out what happened before you clean it. Keep a copy of the infected site - all of it - before anybody starts removing things.
Why restoring a backup is not the fix
Restoring a clean backup is usually the fastest way to get a working site back, and it is worth doing. It is not a repair, for three reasons people discover one at a time:
- It restores the hole as well. The backup contains the same out-of-date plugin that was the way in. You have put the site back exactly as it was on the day it was broken into.
- You may not know how far back clean is. Quiet infections sit for months. A backup from last week can be infected too, and restoring it just resets the clock.
- You lose everything since. Orders, enquiries, new pages, comments. On a shop, that is real money and real customers.
So the order is: restore if it helps, then immediately update everything, then close the way in. A restore that is not followed by those two steps is a countdown.
Finding the way in
Somebody technical has to do this part, but you should know what they are looking for, because it determines whether you are paying for a repair or a rinse:
- The server access logs, around the time the first strange file appeared. This usually names the address and the page that was used.
- File modification dates. Everything changed within a few minutes of each other, on a date when nobody was working, is the event.
- The list of installed plugins and themes with their versions, checked against the published flaws for each. This is where the answer is found most often.
- The user list, for administrators created around that date - and the SSH keys and FTP accounts, where an old one may simply have been used.
- Scheduled tasks, which are how a site reinfects itself at 3am after being cleaned.
Cleaning, and being sure it is clean
Automated scanners are good at the obvious files and poor at the thing that matters: the backdoor. A backdoor is a small, innocuous-looking file whose only job is to let the attacker back in after everything else has been tidied up. They are deliberately written to resemble ordinary site files, and they are often placed several of them, in different folders, precisely so that removing one changes nothing.
A site is clean when all of these are true, and not before:
The way in is named and closed
A specific plugin, version, account or form - and the update or removal that closes it, done.
Everything is on a current version
CMS, plugins, themes and PHP. Anything no longer maintained removed rather than updated.
Every credential is new
Including the database password and any API keys, which are the two people forget.
The site still works
Forms arriving, checkout completing, emails sending, logins working. A clean site that does not take enquiries is not recovered.
Getting the Google warning removed
If Google flagged the site, fixing it does not unflag it. Open Search Console, find the Security Issues report, and request a review once the site is genuinely clean. Requesting it too early is worse than waiting: a failed review takes longer the second time.
If hidden spam pages were indexed, they need to be dealt with as well. Let them return a proper "gone" response rather than redirecting them all to the homepage, which looks to Google like one more thing being hidden. Recovery of rankings is usually weeks rather than days, and it is faster the sooner the review is requested.
If customer data may have been exposed
This stops being a technical question and becomes a legal one. If your site holds customer accounts, orders or any personal information and there is a real chance it was reached, you may have a duty to notify - under the GDPR if you have UK or EU customers, and under state law in much of the US, often within a fixed number of days.
We are not lawyers and this is not legal advice; for anything involving customer data, take some. What we would say from the practical side is that the businesses that come out of this well are the ones that said so early and plainly. The ones that are still dealing with it a year later are the ones that hoped nobody would notice.
The week after
Once the site is back, three things are worth doing while it is still fresh enough to bother:
- Shorten the access list. Old developers, dead FTP accounts, staff who have left. This is the cheapest hour you will spend and it is a short job.
- Put updates on a date. Monthly, in the calendar, with somebody’s name against it - yours or ours. Out-of-date software is the largest single category in every published dataset.
- Test a restore. Not take a backup - restore one, somewhere harmless, and confirm it works. You now know exactly how much that is worth.
And if you are in the middle of this right now and would rather not be, send us the address. We will tell you what we can see from outside, what it will take, and whether you need us at all - some of these are a twenty-minute job and we will say so.