In this article
It usually starts like this: a customer calls to say your website sent them to a casino. Or Chrome shows a red “This site may harm your computer” screen instead of your homepage. Or your host emails you: “malicious code detected on your account, the site has been suspended.” The urge is to do something, anything — and the first hour is exactly when owners make the mistakes that later triple the cleanup time.
Minutes 0–10: make sure it really is a hack
Not everything that looks like a hack is one. The site may be down because of an expired domain or an expired certificate, and ads on your pages may turn out to be an adware extension in your own browser. Signs of a real hack:
- visitors are redirected to other sites — often only on phones and only when they arrive from search;
- pages you never created appear on your domain in search results — casinos, pharmacies, Japanese characters (check with a
site:your-domainsearch in Google); - Chrome or other browsers flag the site as dangerous (Google Safe Browsing);
- your host sent a malware notice or suspended the account;
- your homepage shows someone else’s text or image;
- unknown administrator accounts appeared in your admin panel.
Check from another device. Open the site on your phone over mobile data, coming from a search result rather than a bookmark. Many malicious scripts deliberately leave the owner’s desktop alone so that nothing looks wrong.
Minutes 10–20: lock down access
As long as the attacker has a password, any cleanup is pointless: everything will be back within the hour. Change passwords in this order:
- The email account linked to your hosting and domain — every other password can be reset through it. Turn on two-factor sign-in.
- Your hosting control panel and domain registrar.
- FTP and SSH — every account, including old ones you have forgotten about.
- The site’s admin panel — your own password; remove unknown administrators. Don’t delete suspicious users directly in the database yet — only through the admin panel.
- The database password — only if you know how to update the site’s configuration file at the same time. If not, leave it to a specialist: a wrong change will take the site down.
Change passwords from a computer you trust. If it runs pirated software or “free” browser extensions, that may be exactly where the passwords leaked from.
Minutes 20–35: save the site “as is”
It sounds odd — why keep an infected site? Because it holds the evidence: modified files, timestamps, log entries. They show how the site was broken into, so the hole gets closed instead of just the symptoms being wiped. Delete everything or roll back, and the cause remains — the site gets reinfected.
- download all site files via FTP or the host’s file manager as a single archive;
- export the database (in phpMyAdmin — “Export”);
- download the access and error logs for the last 1–2 weeks from your hosting panel before they are overwritten;
- take screenshots: what visitors see, the host’s email, the browser warning.
Minutes 35–50: limit the damage
If the site sends visitors to scam pages or serves malware, it is better to take it offline for a while than to keep infecting customers and collecting reports with Google. Options, from simple to more involved:
| What to do | When it fits | What it costs you |
|---|---|---|
| Turn on maintenance mode | Your CMS or host has this feature | The site is temporarily unavailable |
| Ask your host to take the site offline | You can’t do it yourself | Site unavailable, but the account isn’t suspended |
| Pause your ads | You are buying traffic | No leads from ads — but no wasted budget either |
| Leave the site up | A “quiet” hack: spam pages in search, no redirects | Risk that Google flags the site as dangerous |
If the site takes payments or stores customer data, this is also about your responsibility to those customers. Don’t stay silent: a short honest message is better than complaints later.
Minutes 50–60: decide who will fix it
Cleaning a site means finding every backdoor (there is almost always more than one), closing the vulnerability, updating the CMS and plugins, checking the database and getting search engine warnings removed. If the site matters to your business, hand this to a specialist — along with everything you gathered in this hour: when you noticed, the symptoms, screenshots, the archive and the logs. It saves hours of work.
What not to do
- Blindly restore an old backup. Infections often appear weeks before anyone notices — you’ll bring the backdoor back with the site. And you’ll lose every order and lead that came in after the backup date.
- Delete “suspicious” files at random. It’s easy to remove a working file and miss the real backdoor disguised as a system file.
- Install the first “antivirus” plugin you find and call it done. It will catch some of the malware, but not the vulnerability it came through.
- Pay whoever emailed “I hacked your website”. That’s extortion; paying guarantees nothing.
- Immediately ask Google to remove the warning. If anything is left on the site, the review fails, and each further review takes longer.
What comes next
After the cleanup there are three tasks. First, get the site off blacklists and remove spam pages from search. Second, close the cause: outdated plugins and components, weak passwords, unnecessary access. Third, make sure that next time you learn about a problem within minutes rather than from a customer: off-site backups and file change monitoring.
If your site has already been hacked, get in touch and I’ll investigate and clean it. If everything is fine for now, RaketaRise monitoring watches for file changes, foreign scripts and blacklists around the clock.
Questions and answers
Will my host clean the site for me?
Usually not. The host reports the problem and may suspend the site so it doesn’t infect others, but cleanup is the owner’s job. Some hosts sell paid cleanup: it removes the files it finds but rarely looks for the vulnerability.
Will my search rankings suffer?
If the site is cleaned quickly and the warnings are removed, rankings usually recover within a few weeks. Spam pages that made it into the index take the longest to disappear.
How long does a cleanup take?
A typical WordPress, Joomla or MODX site takes from a few hours to a day. Getting a Google warning removed takes another day to several days after the review request.
How do I know it won’t be hacked again?
Only if the cause of the hack was found and closed, not just its traces removed. Ask whoever cleans it exactly how the attackers got in — that is the clearest sign of quality work.