All articles

Websites · 27 October 2026 · 3 min read

WordPress site hacked? What to do in the first hour

Your site redirects visitors to a casino, Google shows a red warning, or your hosting provider has suspended the account for sending spam. A hacked site is stressful, but the first hour matters more than speed. Rushed fixes often remove the visible symptom and leave the back door open. Here is the order we follow.

1. Confirm and record what you see

2. Contain the damage

3. Lock the doors

  1. Change the passwords for hosting, the control panel, FTP or SFTP, the database and email accounts linked to the site.
  2. In WordPress, review the list of administrators and remove any account you do not recognise.
  3. Change all administrator passwords and turn on two-factor authentication.
  4. Change the security keys and salts in wp-config.php. This logs out everyone, including the attacker.

4. Restore from a clean backup

The fastest safe fix is a backup from before the infection. Choose one older than the first sign of trouble, and older still if you do not know when it started. After restoring, update WordPress, the theme and every plugin immediately, otherwise the same hole will be used again within days. This is why we recommend tested backups kept outside the hosting account.

No usable backup? Then the site has to be cleaned by hand: compare core files with fresh copies, reinstall plugins from the official source, search the database and uploads folder for injected code. This takes experience and time, and it is easy to miss a hidden file.

5. Find how they got in

If you do not close the entry point, the attack will repeat. The usual causes are:

Your host’s access logs usually show the requests that uploaded the malicious files.

6. Clean up the after-effects

Prevent the next one

Most hacks we see would have been stopped by regular updates, two-factor authentication and a firewall. Our WordPress maintenance checklist and website security checklist list what to do every month. You can also run the free website check to see outdated WordPress versions and missing security headers.

Need help right now?

Hack cleanup is included in our Web Standard and Web Pro plans, and we take one-off emergency cases too. Use emergency help and we will quote the price before we start.

More articles

Websites · 3 min readWebsite security checklist for small businesses: 12 checks in 15 minutesTwelve practical checks for a company website: HTTPS and certificates, security headers, updates, admin login, exposed files, backups and the domain itself, with what to fix first.Read the articleCompliance · 4 min readNIS2 for small businesses: does it apply to you, and what your customers will askWho falls under NIS2, why small suppliers feel it even when the law does not cover them, the ten minimum security measures and a practical plan to answer customer security questionnaires.Read the articleDevSecOps · 4 min readSecuring your CI/CD pipeline: the supply-chain risks small teams overlookYour pipeline holds the keys to production. How attackers abuse CI/CD, and ten concrete controls for GitHub Actions and GitLab CI: pinned actions, minimal token permissions, OIDC, protected branches, runner isolation and signed artifacts.Read the article