How to Recover a Hacked Website
Finding your site hacked is stressful, but rushing makes it worse. Recovery is a clear sequence: contain the damage, preserve evidence, remove the infection, find how they got in, and harden so it can’t recur. This works whatever your site is built on.
Key takeaways
- Don’t just delete the malware — find and close the entry point.
- Take a backup of the hacked state before you clean anything.
- Change every password and key after the site is clean, not before.
- Skipping the “how did they get in” step leads to re-infection.
Step 1 — Contain it
Take the site offline or into maintenance mode if it’s serving malware or spam, so it stops harming visitors and your reputation while you work. Note anything unusual you’ve already spotted.
Step 2 — Back up the hacked state
Before changing anything, copy the current files and database. It feels counter-intuitive to back up an infected site, but it preserves evidence of how the attack happened — which you need to stop it recurring.
Step 3 — Remove the malware
Scan files and the database, identify malicious code and injected content, and remove it. Restoring from a known-clean backup is often faster and safer than cleaning by hand — provided you still complete the next step.
Step 4 — Find the entry point
- Outdated software, plugins or dependencies
- Weak or reused admin passwords
- A vulnerability in custom code
- Compromised hosting or stolen credentials
- A backdoor left from an earlier breach
Step 5 — Harden so it can’t happen again
Update everything, reset all passwords and keys, add multi-factor login, put a firewall in place, and set up monitored, tested backups. Recovery isn’t finished until the original weakness is closed — otherwise you’ll be doing this again.
When to get help
If you can’t find the entry point, keep getting re-infected, or the site handles sensitive data, get expert help fast. We clean, recover and harden hacked sites and web apps remotely on any platform, then put protection in place to prevent a repeat.
Frequently asked questions
- My website was hacked — what do I do first?
- Take it offline if it’s serving malware, back up the current state to preserve evidence, then clean it — but don’t skip finding how they got in.
- Will cleaning the malware fix it for good?
- Only if you also find and close the entry point. Cleaning alone usually leads to re-infection.
- Can you recover a hacked site on any platform?
- Yes — we clean, recover and harden websites and web apps remotely whatever they’re built on.
Related reading & services
- Website & application security
- Website fixing
- Website maintenance
- Website security guide
- Two-factor authentication for business websites
- WordPress vs custom website
- Signs your website has been hacked
- WordPress plugin vulnerabilities explained
More in Speed & Security
- Custom Security Solutions: What They Are and When Your Business Needs Them
- SSL Certificates Explained for Business Owners: What They Do, Whether You Need One, and What They Cost in 2026
- How to Fix the "Not Secure" Warning on Your Website in Chrome, Safari and Firefox
- Website Backup Guide for Small Businesses: What to Back Up, How Often and How to Restore
- My Domain Expired: What to Do, How Long You Have, and How to Get It Back
All Speed & Security articles →
Free tool
Free SSL & Security Headers Checker
See when your SSL certificate expires and which security headers your site is missing.
Try it freeWant this handled for you?
We deliver all of this remotely — get a quote or start with a free audit.
Get a Quote Free Audit