What to do in the first hour after a WordPress hack
A calm, ordered plan for the first hour after you discover a hacked WordPress site: contain, preserve evidence, change credentials and call for help.
At a glance
In the first hour after discovering a hacked WordPress site, your aims are to stop the damage, keep evidence and lock the doors you can reach. Contain the site, save a copy, change credentials from a clean device and call for help before cleaning. This plan is ordered by minute, with what not to do and what to hand over.
Updated November 29, 2026
- For owners who have just found their WordPress site hacked
- Minutes 0 to 10 contain, screenshot, tell your host
- Minutes 10 to 25 copy files and database, save logs
- Minutes 25 to 45 change credentials, rotate keys, turn on 2FA
- Minutes 45 to 60 assess, decide who cleans
- Do not delete files, restore blindly, or rely on one scanner
- Help malware removal and emergency support, any hour
On this page
- What is the plan at a glance?
- Minutes 0 to 10: contain the damage
- Minutes 10 to 25: preserve evidence
- Minutes 25 to 45: change credentials
- Minutes 45 to 60: assess and get help
- What should I not do?
- What should I have ready before it happens?
- A hypothetical walk-through
- What to tell the person who cleans it
- When is it not a hack?
- What comes after the first hour?
- FAQ
In the first hour, your aims are to stop the damage, keep evidence, and lock the doors you can reach. Contain the site, save a copy, change credentials from a clean device, and call for help before cleaning.
If you are not yet sure the site is compromised, start with how to tell if your WordPress site is hacked.
What is the plan at a glance?
| Window | Aim | Key actions |
|---|---|---|
| Minutes 0 to 10 | Contain | Write down what you saw, limit visitors' exposure, tell your host |
| Minutes 10 to 25 | Preserve evidence | Copy files and database, save logs, note recent changes |
| Minutes 25 to 45 | Change credentials | WordPress, hosting, SFTP, database, email, keys, two-factor |
| Minutes 45 to 60 | Assess and get help | Check other sites, DNS, decide who cleans, write the plan |
Minutes 0 to 10: contain the damage
- Stay calm and write down what you saw, with the time. Take screenshots of warnings, redirects and defaced pages. These help whoever cleans the site.
- Limit visitors' exposure. If the site redirects, serves malware or shows spam, take it out of public view. Options: maintenance mode, an "under construction" page from your host, or asking your host to suspend public access. If you use a CDN or firewall in front, your provider may have an "under attack" or block mode.
- Do not delete anything. Resist the urge to remove odd files or reinstall WordPress. You would lose evidence of how the attacker got in, and may miss other backdoors.
- Tell your host. Open a ticket or call. They can see server logs, may have scans, can isolate a site that is attacking others, and may have server-level backups.
Minutes 10 to 25: preserve evidence
- Take a full copy of the site files and database as they are now, and store it somewhere other than the server. Label it as compromised so nobody restores it by mistake.
- Save the logs you can reach: access and error logs from your host, plus any security plugin or firewall logs. Many logs rotate quickly.
- Note recent changes: the last time you updated, who had access and what plugins were added. Look at the Users list and note unknown administrators, without deleting them yet.
Minutes 25 to 45: change credentials
Do this from a computer you trust and that has current security software, since a compromised computer can be how the attacker got in.
- Change your WordPress administrator passwords, and log out all sessions. WordPress has a "log out everywhere" option on the user profile screen.
- Change the hosting account password, and the SFTP, SSH and database passwords. Your hosting control panel handles this.
- Change email passwords for the admin address on the site, since a password reset goes there.
- Change passwords for connected services: CDN, DNS provider, payment gateway dashboards, email marketing and API keys stored on the site.
- Rotate the WordPress secret keys and salts in
wp-config.php, which invalidates existing login cookies. The official generator gives fresh values. Take a backup of the file first, and do not paste keys anywhere public. - Turn on two-factor authentication for your host, registrar and WordPress admins.
If you run a shop, also check payment settings, and tell your payment provider if you suspect card data exposure. Do this early.
Minutes 45 to 60: assess and get help
- Check who else is affected. Other sites on the same account share a fate if one is infected. Ask your host.
- Check Google Search Console and your domain's DNS settings for unfamiliar entries.
- Decide who cleans the site. Cleaning needs finding every backdoor, the entry point, and any injected database content. A partial clean leaves the attacker a way back. A hacked site cleanup specialist or emergency support team does this routinely.
- Write the plan: who is responsible, what is offline, and when you will update customers.
What should I not do?
| Do not | Why |
|---|---|
| Pay anyone who contacts you offering to fix the site unprompted | Unsolicited offers are a common trap |
| Restore the latest backup without checking when the infection began | An infected backup brings the problem back |
| Rely on a single scanner plugin to declare the site clean | It can miss backdoors |
| Leave the site live while it serves malware | Visitors are exposed |
| Reuse old passwords with small changes | Easy to guess |
What should I have ready before it happens?
The first hour is far calmer if some things exist already. A short "break glass" note, kept outside the website itself, makes a large difference:
Who to call, and your account or ticket reference.
Where managed, and who can log in.
How to reach the file manager or SFTP.
Where your latest tested backup is.
Who may take the site offline.
The contact for your payment provider if you run a shop.
Keep it in a password manager or a printed sheet. A hacked site is a bad time to hunt for the email that holds your host's login.
A hypothetical walk-through
Imagine a small business owner who learns from a customer that the site redirects to a gambling page on phones. At minute five she opens the site on her phone, takes a screenshot and notes the time. At minute ten she asks the host to put a holding page up and opens a ticket. By minute twenty she has downloaded a copy of the files and database to an external drive, labelled "compromised", and saved the access log the host gave her. At minute thirty she changes the host, SFTP, database and admin passwords from her own laptop, logs out all sessions and rotates the keys. In the last quarter hour she lists the unknown administrator she found, checks Search Console for new messages, and contacts a specialist with the screenshots and the log. Nothing was deleted, and nothing was restored. That is the whole plan.
What to tell the person who cleans it
A clean-up starts faster when you hand over a short, factual summary. Include:
- When
you first noticed it and how.
- What
visitors see, and on which devices or from which sources.
- What changed
recently: updates, new plugins, new users, hosting changes.
- What you have done,
including every password changed.
- Whether
you hold customer data on the site.
- The copy
of the site you saved, and where it is.
Avoid speculation about who did it. The cause is nearly always automated and ordinary.
When is it not a hack?
Sometimes the problem is a misconfigured redirect, a cached page or a failed update. Before declaring an emergency, check from a second device, look at the Users list and read the host's notices. If nothing unusual appears, the safest assumption is still to change passwords, because the cost is small. Our guide on telling if your site is hacked goes through the checks in detail.
What comes after the first hour?
Cleaning, finding the cause and closing it, restoring from a known-clean state if needed, updating everything, and then watching for reinfection. Then ask your host and Google to review the site if it was flagged. If personal data was involved, take advice about notifying customers and authorities where the law requires it, which depends on where you and your customers are.
Afterwards, put the basics in place: tested backups, prompt updates, and monitoring, which is what our malware removal and care plan services add. If you need someone now, use emergency support.
12-hour clean-up target with 30-day reinfection cover.
Read more02Emergency support15-minute response on plans that include it.
Read more03Hacked site guideThe whole recovery.
Read moreA person answers, any hour. Emergency Rescue is pay-only-if-fixed.
Should I restore a backup straight away?
Not as the first move. A backup may contain the same weakness or the infection itself, and restoring can erase evidence. Preserve a copy first, then clean and close the entry point.
Link to this answerShould I take the site offline?
If it is serving malware, redirecting visitors or sending spam, yes, put it in maintenance mode or block public access while you work. Tell the host if you cannot.
Link to this answerDo I need to tell customers?
If customer data may have been exposed, there may be legal duties to notify. Take advice for your location, and do not guess.
Link to this answerShould I restore a backup straight away?
Not as the first move. A backup may contain the same weakness or the infection itself, and restoring can erase evidence. Preserve a copy first, then clean and close the entry point.
Link to this answerShould I take the site offline?
If it serves malware, redirects visitors or sends spam, yes: use maintenance mode, a holding page from your host or block public access while you work. Tell the host if you cannot.
Link to this answerWhy not delete the suspicious files immediately?
You would lose evidence of how the attacker got in and may miss other backdoors. Preserve first, then have everything found and removed properly.
Link to this answerWhich passwords should I change and from where?
WordPress administrators, hosting, SFTP, SSH, database, the admin email account and connected services such as CDN, DNS and payment dashboards. Do it from a computer you trust with current security software.
Link to this answerWhat are WordPress secret keys and salts?
Values in wp-config.php that protect login cookies. Rotating them invalidates existing login cookies and logs everyone out. Back up the file first and do not paste keys anywhere public.
Link to this answerDo I need to tell customers?
If customer data may have been exposed there may be legal duties to notify. Take advice for your location rather than guessing, and tell your payment provider early if you suspect card data exposure.
Link to this answerWhat should I save as evidence?
A full copy of files and database labelled compromised and stored off the server, the access and error logs from your host and any security plugin logs, screenshots with times, and a note of recent updates and access changes.
Link to this answerWhat should I hand to the person who cleans it?
When you noticed and how, what visitors see and on which devices, recent changes, what you have already done including passwords changed, whether you hold customer data and where the saved copy is.
Link to this answerIs it always a hack?
Sometimes it is a misconfigured redirect, a cached page or a failed update. Check from a second device, look at the Users list and the host's notices. If nothing unusual appears, changing passwords is still the cheap safe step.
Link to this answerWho can clean the site for me?
Malware clean-up has a 12-hour target and 30-day reinfection cover, and emergency support responds within 15 minutes on plans that include it. Emergency Rescue is pay-only-if-fixed.
Link to this answerKeep reading
Want an engineer on it?
Tell us what is wrong in plain words. A person reads it, today.