
At a glance
Put the site into maintenance mode, change every password and remove unknown users. Then find the gap the attacker used, clean the site or restore a backup from before the attack, and close the gap before the site goes back online. If personal data may be affected, check your duty to report under the FADP.1 Afterwards, a web application firewall in front of the site blocks the most common ways in.
How to tell your site was hacked
A hacked WordPress site rarely announces itself. These are the signs that show up most often, first for visitors and then inside WordPress.
What visitors notice
- Redirects to unknown sites
- A browser or Google warning such as «This site may be hacked»2
- Pages in a foreign language or full of spam links
- Your host suspends the account
What you notice in WordPress
- Admin users you did not create
- Plugins or files nobody installed
- Spam e-mails sent from your domain
- A sudden jump in server load or traffic
First steps in the right order
If you are asking what to do now that your website is hacked, work through these five steps in this order. Each one prepares the next.
01
Contain
Switch the site to maintenance mode or take it offline, and tell your hosting provider. Keep the server logs: they show how the attacker got in.
02
Reset every login
Change the passwords for WordPress, hosting, SFTP, the database and the e-mail accounts linked to the site. Remove unknown admin users and switch on two-factor login.
03
Find the gap
The usual causes are an outdated plugin or theme, a reused or weak password, or software from an unofficial source. Until the gap is found, the attacker can come back.
04
Clean or restore
Replace WordPress core, themes and plugins with clean copies, remove injected code and check the database, or restore a backup from before the attack.
Recovering a hacked site
Yes, in most cases. A backup from before the attack, restored and tested, brings content and orders back to that point; anything added since has to be entered again. Restoring yesterday’s backup and carrying on as before is not enough: the gap that let the attacker in is still open, and the backup may already contain a hidden admin account or injected code. At ScaleAble, our response and recovery service follows this order, containment, cleanup and recovery, and documents what was found and what was changed.
How a firewall blocks the usual way in
Most attacks on a hacked WordPress site start in one of two ways, and a web application firewall (WAF) in front of the site stops both before the request reaches WordPress.5
Login brute force
Bots try long lists of passwords on wp-login.php. The firewall limits login attempts per address and shows bots a challenge, so they never reach the login form.6
Outdated plugin exploits
Attacks on known plugin vulnerabilities follow recognisable patterns. The firewall’s rules filter these requests and buy time until the update is installed; it does not replace the update.
For Poolroboter.ch, Cloudflare sits in front of every page and the login page answers with a Cloudflare challenge (case page, October 2026). How we set up and maintain this layer is described on our website protection page.
Keeping it from happening again
Most of the work is routine: updates tested on staging, a copy of the site that only you and your developers see, backups whose restore is tested, two-factor login, as few plugins as possible and monitoring that reports changes. A WordPress security audit shows where a site stands today, and WordPress maintenance keeps it there. If Google flagged the site as hacked, our RankExperts brand checks Search Console and the rankings once it is clean.
Sources
- Swiss Confederation (2020): Federal Act on Data Protection (Data Protection Act, FADP), SR 235.1, Art. 24. Legal text, unofficial English translation, status as of 1 September 2023. https://www.fedlex.admin.ch/eli/cc/2022/491/en. Accessed 18 November 2026. ↩︎
- Google (n.d.): Report a problem with Google Search, section «“This site may be hacked” message». Google Search Help, no publication date. https://support.google.com/websearch/answer/190597?hl=en. Accessed 18 November 2026. ↩︎
- Google (n.d.): Report a problem with Google Search, section «“This site may be hacked” message». Google Search Help, no publication date. https://support.google.com/websearch/answer/190597?hl=en. Accessed 18 November 2026. ↩︎
- Swiss Confederation (2020): Federal Act on Data Protection (Data Protection Act, FADP), SR 235.1, Art. 24. Legal text, unofficial English translation, status as of 1 September 2023. https://www.fedlex.admin.ch/eli/cc/2022/491/en. Accessed 18 November 2026. Federal Office for Cybersecurity BACS (n.d.): Voluntary notification. BACS Report, online platform for reporting cyber incidents, no publication date. https://www.report.ncsc.admin.ch/en/. Accessed 18 November 2026. ↩︎
- WordPress.org (2023): Hardening WordPress. Advanced Administration Handbook, first published 28 March 2023, last updated 14 October 2026. https://developer.wordpress.org/advanced-administration/security/hardening/. Accessed 18 November 2026. ↩︎
- WordPress.org (2023): Brute Force Attacks. Advanced Administration Handbook, first published 28 March 2023, last updated 14 October 2026. https://developer.wordpress.org/advanced-administration/security/brute-force/. Accessed 18 November 2026. ↩︎
Help after a hack
Tell us what you see on your site and who has access to it. We are here for you personally: the first assessment is free, then you receive the next steps in the order above and an estimate for cleanup and protection.


