- Save a full locked copy of your files, database and server logs BEFORE wiping bad code or resetting your hosting.
- Do not rely on yesterday's backup alone. Hacks often plant hidden backdoors weeks before any spam shows up.
- Change every login that touched the server: hosting panel, database, FTP/SSH, admin accounts, email and payment keys.
- Return real 404 or 410 'page gone' codes on fake spam links so Google clears them out of search results smoothly.
- Check your POPIA Section 22 breach duties right away if customer enquiry forms, orders or databases sat on that host.
In this guide (7 sections)9 min read
- 01Confirm every symptom of a live website compromise
- 02Contain the incident and capture forensic evidence (First 60 minutes)
- 03Eliminate malware, hidden webshells and database injections completely
- 04Rotate all credentials and seal the original entry point
- 05Handle polluted Google spam URLs and submit your Search Console review
- 06Evaluate POPIA Section 22 notification duties and add 24/7 monitoring
- 07Frequently asked questions
Confirm every symptom of a live website compromise
Most website hacks never deface your homepage, because hackers make more money when owners do not notice. Hidden PHP scripts often act normal while you are signed in, yet send Google's scanner and mobile visitors straight to fake shops or scam pages.
Look for early warning signs across both Google search results and your hosting account before waiting for a customer to call.
- Searching
site:yourdomain.co.zaon Google shows strange medicine, casino or foreign-language pages. - Tapping your site from Google on a mobile phone sends you straight to scam prize or login pages.
- Google Search Console (Google's free search report) shows a Security Issue alert, or Chrome shows a red 'Deceptive site ahead' screen.
- Your hosting company warns you about overloaded CPU usage, bulk spam emails or unknown admin users inside WordPress.
Contain the incident and capture forensic evidence (First 60 minutes)
Deleting hacked files in a rush wipes out the server logs and timestamps you need to see which weak password or outdated plugin let the hacker in. Those logs also show whether client details were downloaded.
- Save an offline locked copy of your website folder, full database export and the last 30 days of web, file and login logs.
- Turn on a temporary maintenance page or Cloudflare Under Attack mode if visitors are seeing scam pages or fake downloads.
- Sign out all active WordPress and hosting sessions, and lock file access (FTP and SSH) to your recovery helper's IP address only.
- Ask hosting support whether any other sites sharing the same hosting server were hacked at the same time.
Rotate all credentials and seal the original entry point
Once hacker code runs on your hosting account, assume every password, database login and payment or email token saved in config files has been copied.
- Change your hosting panel login, SFTP and SSH keys, database password and WordPress security keys all at once.
- Force new passwords and app-based two-step login (MFA) for every admin and email user, with no shared logins.
- Replace all outside API keys: email senders, PayFast, Yoco or Ozow keys, CRM links and webhook secrets.
- Update core software and plugins, delete leftover
/staging/or/backup.sqlfiles, and place a website firewall (such as Cloudflare WAF) in front of your site.
Handle polluted Google spam URLs and submit your Search Console review
Leaving 5,000 fake spam links showing broken errors, or pointing every fake pharmacy page back to your homepage, confuses Google and slows recovery. Make every fake spam link return a clear 404 Not Found or 410 Gone message, clear Cloudflare caches, and test one or two spam links in Google Search Console URL Inspection.
Once those spam links show 404 or 410 and your live homepage looks clean, open Security & Manual Actions > Security Issues in Search Console and send a short two-sentence review explaining what caused the hack, that logins were changed, and what locks are now active.
Evaluate POPIA Section 22 notification duties and add 24/7 monitoring
In South Africa, Section 22 of POPIA sets clear rules if there are good reasons to think customer details held by your business were seen or taken without permission. Share your saved log copy with your legal adviser right away if client lead tables, accounts or CVs were kept on that server.
Going forward, combine 24/7 downtime and HTTPS alerts, file change checks, separate cloud off-site backups and monthly update habits so small problems never grow unseen again.
- Check billing email accounts and your
.co.zadomain registrar too, because hackers sometimes add hidden forwarding rules or extra users after breaking into main accounts. - Check shared hosting accounts carefully or move onto isolated cloud hosting so a hack on a neighbour's site cannot cross into yours.
Frequently asked questions
How long does cleaning a hacked website and clearing Google blocks usually take?
Cleaning files, removing hidden backdoors, changing passwords and locking down your hosting usually takes 24 to 72 hours depending on site size. Google Safe Browsing checks often clear red browser warnings in 1 to 4 days, while fake spam links drop out of search over 2 to 6 weeks.
Is it better to wipe everything and rebuild from scratch?
Often yes. When backups are also infected, custom files have no saved version history, or bad code spread across several folders, moving your clean words and photos onto a fresh hosting account or static Next.js build is frequently faster, safer and cheaper than hunting hidden scripts for days.
Will our website stay clean permanently once repaired?
Your site stays safe when every backdoor is removed, all hosting and admin passwords are changed, old contractor accounts are deleted and two-step login is turned on. Pairing weekly software updates with a website firewall and off-site backups keeps common bot attacks from breaking back in.
Does getting hacked ruin Google organic rankings forever?
No, not if you fix the break properly. Once your site is clean, returning real 404 or 410 'page gone' answers on fake spam links and clearing Google Search Console warnings lets Google drop the bad links and rebuild trust in your real pages over the following weeks.
Do small businesses really face POPIA obligations after a site breach?
Yes. Section 22 of POPIA applies to every South African business, large or small, whenever stored customer or enquiry details may have been exposed without permission. Keep your server logs intact and speak with your legal adviser quickly to check whether you need to notify affected people and the Information Regulator.
What is the very first thing to do after discovering a website has been hacked?
Save a full copy of your files, database and server logs before deleting anything, then change hosting, file, database and admin passwords right away. Turn off any outdated plugin and avoid wiping logs you may need under POPIA. Contact our website security team for urgent help.
Why does a hacked WordPress site often get re-infected within days?
Deleting only the obvious spam files leaves behind secret PHP backdoors, hidden scheduled server tasks, fake admin accounts or the exact same outdated plugin that let hackers in. Proper recovery checks every layer of your site, removes all persistence hooks and puts a Cloudflare edge WAF in front to block repeat attacks.
How do I check if Google has already indexed Japanese or pharma spam on our domain?
Search site:yourdomain.co.za on Google to see every page Google has listed for your domain, looking out for strange medicines, casino titles or foreign characters. Also open Security & Manual Actions and the Pages report in Google Search Console to catch hidden spam links or mobile redirects early.
How much does emergency hacked website recovery typically cost in South Africa?
Emergency cleanup costs depend on your editing platform, hosting access and whether clean off-site backups already exist. Fixing an active compromise, changing every access key, testing files and clearing Google flags almost always costs several times more than ongoing website security monitoring, timely updates and daily cloud backups.
Can attackers steal domain ownership during a hosting breach?
Yes, especially if your hosting account, work email and .co.za domain registrar share reused passwords with no two-step login. Attackers can use stolen email access to reset registrar passwords and move your domain away. Lock your domain transfers right away using our domain hijacking guide.
Should we trust automated hosting malware scanners alone after an attack?
No. Automated hosting scanners often miss scrambled scripts hidden inside database tables, .htaccess redirects aimed only at mobile visitors, and unknown server login keys. A proper cleanup always compares core files against clean official downloads and checks database admin users, scheduled server tasks and logs by hand.
How do off-site backups cut downtime during ransomware or server hacks?
Locked daily copies saved away from your main hosting server cannot be wiped or held hostage if hackers break into your account. You can restore known clean files and data onto a fresh, locked-down server quickly instead of starting over. Read our off-site website backups guide.

