Hacked Website Recovery -- Perth IT Care
It's 3pm on Tuesday. A customer calls saying your website is showing gambling ads instead of your homepage. Your first instinct is to panic and start clicking things. Here's why that's the worst thing you can do -- and how most hacked website recovery attempts turn a 2-hour fix into a week-long disaster that could've been avoided.
The reality is brutal but simple: most hacked websites can be recovered within hours if you follow the right steps immediately. But most business owners make critical mistakes in those first crucial minutes that turn a quick cleanup into an expensive, drawn-out nightmare.
Don't Touch Anything (Seriously)
Your website's been compromised. Every instinct screams "fix it now" but here's what happens when you start poking around without a plan:
You log into your hosting control panel and start deleting suspicious files. Except you just deleted legitimate files that looked suspicious. Now your website won't load at all.
You change your WordPress admin password. The malware detects this and triggers its nuclear option, corrupting your database. Now instead of cleaning malicious files, you're rebuilding everything from scratch.
You restore yesterday's backup. Plot twist: your site's been compromised for three weeks. You just restored infected files and the hack starts again within hours.
The first rule of hacked website recovery is the same as the first rule of medicine: first, do no harm. Document what you're seeing, take screenshots, but don't touch the actual website until you understand what you're dealing with.
Is Your Website Actually Hacked?
Before you assume the worst, rule out the obvious. Sometimes what looks like a hack is actually:
DNS hijacking: Your domain's DNS records point to someone else's server. Check your domain registrar account for unauthorised changes.
CDN corruption: If you use a content delivery network, cached malicious content might display even after your actual site is clean.
Browser malware: The infection might be on your computer, not your website. Check your site from a different device and network.
Hosting account suspension: Your hosting provider might've suspended your account for security reasons, showing their default warning page instead of your content.
If other people see the same malicious content and you can confirm it's actually your website serving it, then yes -- you're looking at a genuine compromise that needs immediate action.
The Critical First 30 Minutes
Once you've confirmed it's actually a hack, here's your emergency response checklist:
Change all passwords immediately: WordPress admin, hosting control panel, FTP, email accounts associated with the domain. Use completely new passwords, not variations of old ones.
Check recent file changes: Log into your hosting control panel and look for recently modified files. Most compromises leave a trail of recently created or modified files with suspicious names or locations.
Isolate the infection: If you have multiple websites on the same hosting account, check them all. Malware loves to spread between sites in shared environments, which is why you shouldn't have multiple websites in one hosting environment.
Document everything: Screenshot the malicious content, note when you first discovered it, save copies of any suspicious files before you delete them. You'll need this information for cleanup and to prevent reinfection.
What Not to Do in Those First 30 Minutes
Don't restore backups without checking when the infection started. Don't delete files unless you're 100% certain they're malicious. Don't change your domain DNS settings to "hide" the problem -- this just makes diagnosis harder later.
Most importantly, don't panic-install security plugins on a compromised WordPress site. Adding more code to an infected environment often makes things worse, not better.
Step-by-Step Recovery Process
1. Assess the Damage
Start with file integrity checks. Compare your current WordPress files against clean versions from wordpress.org. Look for:
- Files in unusual locations (PHP files in upload directories)
- Recently modified core WordPress files
- Suspicious database entries (new admin users, modified post content)
- Malicious redirects in .htaccess files
2. Clean Infected Files
Remove obvious malware first -- files with random names in your uploads folder, suspicious PHP files in your themes directory, backdoors in your plugins. But be surgical about it. When in doubt, quarantine files instead of deleting them.
For WordPress sites, the safest approach is often replacing core files entirely with fresh downloads, then checking themes and plugins individually.
3. Check Database Integrity
WordPress database compromises usually target user accounts (creating new admin users), post content (injecting spam links), or options table (adding malicious redirects). Run SQL queries to find:
- User accounts created recently
- Posts or pages modified without your knowledge
- wp_options entries with suspicious URLs or code
4. Update Everything
Once you've cleaned the immediate infection, update WordPress core, all themes, and all plugins to their latest versions. Many compromises exploit known vulnerabilities in outdated software.
This is also when you should implement the security measures you should've had from the start -- proper file permissions, security headers, and regular updates. Our WordPress security guide covers the essential hardening steps that prevent reinfection.
Why DIY Recovery Often Makes Things Worse
Here's what we see constantly: a business owner discovers their website's been hacked, spends the weekend "fixing" it themselves, then calls us on Monday because the site's completely broken and the hack came back.
Incomplete cleanup: You found some malicious files but missed the backdoor that lets attackers back in. The hack returns within days, often harder to detect the second time.
Collateral damage: In the rush to remove infected files, you accidentally delete legitimate files or break functionality. Now you're dealing with both security issues and a broken website.
Reinfection through backups: You restore what you think is a clean backup, but it contains the original infection vector. You're back where you started, just with more downtime.
Missing the root cause: You clean the visible symptoms but don't address how attackers got in. Whether it's an outdated plugin, weak passwords, or compromised FTP credentials, they'll use the same method again.
Prevention Is Worth 10 Recovery Attempts
Every hacked website recovery teaches the same lesson: the time to implement security is before you need it, not after. The businesses that recover quickly and don't get reinfected are the ones that had proper backups, monitoring, and update procedures already in place.
Regular security updates, strong passwords, limited file permissions, and offsite backups aren't just best practices -- they're the difference between a 2-hour cleanup and a 2-week nightmare.
If your website's been compromised, document what you're seeing and get professional help before you start clicking things. The cost of proper recovery is always less than the cost of fixing a botched DIY attempt.

