WordPress hacked: what to do now

When a WordPress site has been hacked, the order of the next steps matters most. This guide walks through containment, cleanup and recovery and shows how to keep the next attack out.

Start Your Project
Illustration: a website window next to a blue shield with a cracked padlock

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.

05

Check and report

Test the site, then ask Google to review it in Search Console.3 If personal data may have leaked, the FADP requires a prompt report to the FDPIC when the breach is likely to put people at high risk; you can also report the attack to the Federal Office for Cybersecurity (BACS).4

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

  1. 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. ↩︎
  2. 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. ↩︎
  3. 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. ↩︎
  4. 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. ↩︎
  5. 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. ↩︎
  6. 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.

Frequently asked questions about a hacked site

How do I check if my WordPress site is hacked?

Look for admin users you did not create, plugins or files nobody installed, redirects to unknown sites and spam pages in Google results, for example with a search for site:yourdomain.ch. Google Search Console lists detected problems under «Security issues». A malware scanner helps, but a manual check of users, files and the database is more reliable.

Can a hacked website be recovered?

Usually yes: with a backup from before the attack, or by replacing the affected files with clean copies and cleaning the database. What matters is closing the gap first, otherwise the site is hacked again. Our response and recovery service handles both and documents the result for you.

What is the first thing to do when your website is hacked?

Put the site into maintenance mode and change all passwords: WordPress, hosting, SFTP, database and e-mail. Then tell your hosting provider and keep the server logs, because they show how the attacker got in. Avoid deleting files at random, because that removes the traces you need to find the gap.

Do I have to report a hacked website in Switzerland?

If personal data such as customer accounts or orders may have been accessed and the breach is likely to put people at high risk, the FADP requires a prompt report to the FDPIC, and in some cases the people concerned must be informed. You can also report the attack to the Federal Office for Cybersecurity (BACS).

Why do WordPress sites get hacked?

Mostly through outdated plugins and themes with known vulnerabilities, weak or reused passwords and software from unofficial sources. WordPress itself is rarely the gap. Updates, two-factor login and a firewall in front of the site close most of them; a WordPress security audit shows which apply to your site.

Yura Khrystiuk

Yura Khrystiuk

External WordPress expert with over 8 years of experience building, optimising and maintaining professional websites. His focus areas include custom WordPress and WooCommerce solutions, technical SEO and GEO (visibility in AI-driven search), performance optimisation for Core Web Vitals, as well as server configuration, website security and Cloudflare protection. He works primarily with SMEs and B2B companies in the DACH region – from planning and technical implementation to ongoing maintenance – with a focus on fast, secure and sustainably maintainable websites.

Articles: 9

Start a project

Tell us about your project

Tell us about your project. We will get back to you personally and look forward to your ideas.

  • A personal reply within one working day
  • One contact person who speaks your language
  • A conversation about goal and scope, then a proposal that fits your project
  • Your details are used only to answer your request
Project Request (EN)

How we use your details is explained in the privacy policy.