When your website is hacked, it rarely stops at a defaced home page. Usually attackers quietly use the site in the background for their own purposes until Google flags it as dangerous or the hosting provider shuts it down. What matters then is acting in the right order: contain the damage, preserve evidence, restore cleanly, close the vulnerability and renew all access credentials.
How a typical attack unfolds
Most attacks on small websites are not targeted but automated. Programs scan the internet for known vulnerabilities, for example in an outdated plugin. Once a vulnerable site is found, the process often looks similar:
- The attacker exploits the vulnerability and uploads a so-called web shell, a small script that lets them control the server remotely.
- They create further backdoors, often hidden in harmless-sounding files or as an additional administrator account.
- The site is abused: for spam pages, redirects to fraudulent offers, phishing or sending spam emails.
- Google detects the abuse and warns visitors about your site or removes it from the search results.
- The hosting provider blocks the site to protect other customers and its infrastructure.
Weeks can pass between the break-in and the moment you notice something.
How to recognize a break-in
- Visitors are redirected to other sites, often only on smartphones or only when arriving via Google.
- Pages with unfamiliar content appear under your domain in the search results.
- Browsers or Google display a security warning.
- The backend contains user accounts that nobody created.
- There are unknown PHP files on the server, for example in the uploads folder.
- Your emails are suddenly rejected because your server is on blocklists.
What you should do, and in which order
- Contain: Take the site offline or switch it to maintenance mode so that visitors are not put at further risk.
- Preserve evidence: Before anything is deleted, files, database and server logs should be copied. This is the only way to reconstruct later what happened.
- Determine when the break-in happened: Logs and file changes are used to establish when the attack began.
- Restore from a clean backup: This means a state from before the break-in, not simply the latest backup.
- Close the vulnerability: The exploited weakness must be fixed before the site goes back online. Otherwise it will be compromised again in no time.
- Renew all credentials: Passwords for WordPress, database, FTP and SSH, the hosting customer account as well as API keys and the security keys in the WordPress configuration.
- Review users: Go through all accounts and delete unknown accounts or ones that are no longer needed.
- Follow up: Request a review from Google and monitor the site over the following weeks.
Why a backup alone is not enough
Many site owners think: we have a backup, so we will just restore it. The problem is that a backup from the previous day usually already contains the backdoor. If you do not know when the attack began, you may well restore the compromised site. On top of that, as long as the original vulnerability is open, the same automated attack can succeed again immediately.
So a backup is necessary, but it only becomes useful together with an analysis of the incident. The further back your backups go, the more likely you are to find a clean state.
Notification obligation under the GDPR
If personal data was affected, such as customer accounts, orders or stored form submissions, there may be an obligation to notify. Under Art. 33 GDPR, a personal data breach must generally be reported to the competent supervisory authority within 72 hours of becoming aware of it, unless it is unlikely to result in a risk to the people affected. In some cases, the affected individuals must also be informed.
This deadline runs out quickly. That is another reason why it is important to preserve evidence and document the incident. The legal assessment of the individual case belongs in the hands of a data protection consultant or a law firm.
Frequently asked questions
Is it enough to delete the suspicious files?
Usually not. Attackers typically create several backdoors, including in the database. If you only remove the obvious ones, it is easy to miss the rest.
Is my small website even a target?
Yes. Most attacks are automated and look for vulnerabilities, not for specific companies. Size and recognition hardly play a role.
How can I prevent a hack?
Regular updates, a small number of well-maintained plugins, strong passwords with two-factor authentication, a firewall on the server and backups with a sufficiently long retention period significantly reduce the risk.
We run websites for small businesses, medical practices, law firms and associations on our own servers and take care of updates, monitoring and backups. If your site is behaving suspiciously or you want to take preventive action, get in touch with us. You can find out more about our services under Hosting and operations.



