- Don’t rush to delete; save a copy of the current state for analysis before cleaning.
- Change every password and key after cleaning, not only before.
- Restoring a clean backup is often faster, but you must close the hole the attacker came through.
- If a Google warning appears, clean up and then request a review through Search Console.
- Most WordPress hacks come from outdated plugins or themes, or weak passwords.
A message from a client: “Your website is redirecting me to a strange site!”. You open the site from your office and it looks completely normal. You try it on your phone via a Google search, and it redirects you to a suspicious page. This is a common technique: the attacker hides the hack from the site owner (who visits directly or while logged in) and shows it to visitors arriving from search or on mobile. A few days later your visitors may see a big red browser warning: “The site ahead may be dangerous.”
A hack is a worrying experience, but a calm, organised response limits the damage a great deal. In this guide we explain the steps we follow when responding to a hacked site within our hosting and maintenance service.
Signs of a hack
| Sign | What it may mean |
|---|---|
| Visitors redirected to other sites | Malicious code in the files, the database or the server settings |
| Strange pages or links in Google (drugs, gambling, counterfeit goods) | Injected spam pages exploiting your domain’s reputation |
| A browser or Google warning | Malware or phishing detected |
| Administrator users you don’t recognise | The attacker has created a back door |
| Strange PHP files in the uploads folder | Back doors |
| Spam email sent from your server | The server being used to send |
| Sudden slowness and high resource use | The server being used for mining or attacks |
| A changed home page | Open defacement |
The first hours: what to do immediately
- Don’t panic, and don’t delete anything yet. Hasty deletion removes the evidence of how the attacker got in.
- Save a copy of the current state (files, database and server logs) somewhere separate, for analysis.
- Contain the damage: enable maintenance mode if the site is harming visitors with redirects or malware.
- Change the critical passwords immediately — the hosting control panel, the domain and the email linked to them — from a clean device.
- Inform the hosting provider: it may have logs and scanning tools, and the hack may be at server level.
- Determine whether personal data was exposed: client data, orders, accounts. This decides your notification obligations.
- Pause ads pointing to the site until it’s clean.
Analysis: how did the attacker get in?
Cleaning up without knowing the vulnerability usually means a new hack within days. The most common sources on WordPress sites:
- An outdated plugin or theme with a known vulnerability.
- “Nulled” plugins or themes from unofficial sources that already contain back doors.
- A weak or leaked password for an administrator or hosting account.
- Another hacked site on the same hosting account.
- File permissions more open than necessary.
- An administrator’s device infected with malware that stole login details.
Server logs (access and errors), file modification dates and new users help identify the entry point and the timing.
Recovery: two main options
| Option | When it fits | Steps |
|---|---|---|
| Restore a clean backup | When there is a backup from before the hack | Establish the date of the hack, choose a copy from before it, restore it, update everything, close the vulnerability, and carry over legitimate content added after the copy |
| Manual cleaning | When there is no clean copy, or the hack is very old | Replace WordPress core, plugins and themes with fresh official copies, inspect custom files and the uploads folder, clean the database, delete suspicious users and scheduled tasks |
This is where a good backup strategy with multiple copies over long periods proves its value; the hack may have started weeks before it was discovered.
After cleaning: closing the doors
- Change every password again: site administrators, the database, hosting, the domain, email, FTP/SFTP.
- Regenerate the security keys in the WordPress configuration file to end all open sessions.
- Delete any unused user, plugin or theme.
- Update everything to the latest version, and replace any plugin that is no longer supported.
- Enable two-factor authentication for every administrator.
- Set file permissions correctly and block PHP execution in the uploads folder.
- Enable a web application firewall. Read CDN and protection.
- Check the devices of everyone with administrator access.
For the full list of preventive protection, read the WordPress security guide.
Google warnings and spam pages
If your site shows a security warning or spam pages in search results:
- Open the “Security issues” report in Google Search Console to see what Google detected and samples of the affected pages.
- After a complete clean-up, request a review from the same report, explaining what you did.
- Delete the injected spam pages and make them return a 404 or 410 error; you can use the temporary removals tool to speed up their disappearance from results.
- Check whether unknown new owners were added to your property in Search Console, and remove them.
Email after a hack
If your server was used to send spam, the reputation of its address and your email may be damaged. Stop the suspicious sending, review the mail logs, check blacklists and set up authentication. This is one more reason to separate business email from the website server. Read email authentication.
Notification and obligations
If the site collects personal data and a leak is possible, data protection laws may require you to notify the competent authority within a set period and to inform data subjects in certain cases. Document what happened and what you did, and consult a legal specialist. For organisations subject to the National Cybersecurity Authority’s controls, follow the approved incident-reporting procedures. Read data residency and protection.
Communicating during the crisis
Silence is the worst response when clients notice something is wrong. Prepare a short, calm message for clients who ask: “We’re aware of a technical issue with the website and are working to fix it; you can reach us by WhatsApp or phone until the site is back.” Don’t go into technical details or guesses before the analysis is complete. If it turns out data was affected, the follow-up message must be honest and clear: what happened, which data was affected, what the company has done, and what it advises clients to do (such as changing their password). Companies that handle incidents transparently usually keep their clients’ trust better than those that try to hide them and are later exposed.
Internally, appoint one person to handle communication with clients and the media if needed, and another to liaise with the provider and the technical team, so no conflicting messages go out. Keep a timeline of everything that happened and every action taken, with its time; it’s useful for analysis, for official reporting if required, and for the post-incident review. Record the names of the provider contacts and ticket numbers too; they save a lot of time in follow-up.
Lessons after the incident
Once things calm down, sit with the team and answer in writing: how did the attacker get in? When did the hack start, and when did we discover it? Why was discovery delayed? What worked in the response and what stumbled? What measures will prevent a repeat, who owns each one, and by when? This review isn’t about blaming anyone but about turning an unpleasant incident into a stronger system. Many companies come out of their first hack with real backups, monitoring and regular updates they never had before.
The bottom line
When hacked: preserve the evidence, contain the damage, change passwords, identify the vulnerability, restore a clean copy or clean carefully, close the doors, request a Google review, and meet notification obligations where needed. Most importantly, build a prevention system that makes a repeat less likely. We handle response, recovery and ongoing protection within hosting and maintenance. Get in touch right away if your site is hacked now.
Real projects we delivered
FAQ
How do I know my site has been hacked?
Signs include: pages or links you didn’t add, visitors redirected to other sites (sometimes only on mobile or only from Google), a browser or Google warning, new administrator users, sudden slowness, or spam email from your server.
Should I delete the site and rebuild it?
Not necessarily. Restoring a clean backup, or careful cleaning while closing the vulnerability, is usually enough. Rebuilding makes sense if the site is very old and can’t be updated.
Must I inform my clients?
If personal data may have leaked, you may be required to notify the competent authority and the data subjects under personal data protection law. Consult a legal specialist.
How long does recovery take?
Restoring and cleaning can take hours to days depending on the site’s size and the depth of the hack, and removing a Google warning after requesting a review can take days.
Sources
Want this applied to your project?
Book a free consultation — we will review your site or brand and propose a clear plan.
Book a free consultation






