Opens in a new tab

Guide · Security

WordPress site hacked? What to do, step by step.

How to tell if your site’s been hacked, what to do in the first hour, how to clean it up, and how to stop it happening again. Written for site owners, not developers.

By Ryan Pierce, RP/MADE · Updated November 2026 · 7 min read

01

Signs your site has been hacked

  • Google shows “This site may be hacked” under your listing, or Chrome shows a red warning page.
  • Your search results show pages you never made, often in Japanese or selling shoes, bags or pills. This is known as the Japanese keyword hack.
  • Visitors who arrive from Google, or on a phone, get sent to another site, while it looks fine when you type the address yourself.
  • Admin users, plugins or files you didn’t add.
  • Your host has suspended the site or warned you about malware.
  • Search Console shows a security issue, or email from your domain starts landing in spam.

Many hacks hide from the owner. The spam is shown only to Google, or only to first-time visitors, so the site can look normal to you for months.

02

A two-minute check

  1. Search Google for site:yourdomain.comScroll through the results and look for pages or languages you don’t recognise.
  2. Do the same for subdomainsOld test copies like staging.yourdomain.com are a favourite target, because nobody updates them.
  3. Open Search Console → Security & Manual Actions“No issues detected” on both pages is what you want to see.

03

The first hour

  1. Don’t panic-deleteTake a copy of the site as it is, files and database. You’ll need it to work out how they got in.
  2. Change every passwordWordPress admins, your hosting account, SFTP/FTP, the database, and the email account tied to the site. Then log everyone out.
  3. Check your usersRemove any admin account you don’t recognise.
  4. Tell your hostMany will help, and some will suspend the site until it’s clean anyway.

04

Cleaning it up

  1. Restore a clean backup, if you have oneA backup from before the hack is often the fastest fix. Update everything straight away afterwards, or the same hole lets them back in.
  2. Otherwise, replace the softwareReinstall WordPress, your theme and plugins from fresh copies. Remove anything you don’t use, anything pirated (“nulled”), and anything its developer has abandoned.
  3. Find what was addedPHP files inside the uploads folder, strange code at the top of files like wp-config.php or .htaccess, and files changed around the time things went wrong. A security scanner helps.
  4. Check the databaseLook for spam posts and pages, and scripts injected into posts, widgets or settings.

This is where it’s easy to miss something. If one hidden backdoor survives, the site is usually reinfected within days.

05

Getting Google to trust it again

  1. Request a reviewIn Search Console, open Security issues and ask Google to review the site once it’s clean. It usually takes a few days.
  2. Hide the spam pages fastUse Removals → “Remove all URLs with this prefix” for spam sections or subdomains.
  3. Make sure the spam now returns “not found”That’s what makes Google drop those pages for good.
  4. Give it a few weeksSearch Console reports look messy while Google recrawls. Rankings usually recover once the site is clean.

A real example: I’ve seen a whole domain’s search results filled with Japanese shopping spam that came from one forgotten staging copy on a subdomain. The fix was deleting the old copy’s subdomain and asking Google to drop its addresses.

06

Stopping it happening again

  • Update plugins and themes every week, and security fixes the same day. Patchstack found the most heavily targeted WordPress holes are typically attacked within about 5 hours of going public.
  • Daily backups stored off the server, and a restore tested now and then.
  • Two-factor login for every admin, and no shared or reused passwords.
  • Delete old staging copies, test sites and unused plugins.
  • Have someone watching. Security monitoring catches changes as they happen.

That’s what MADE/SECURE, my hosting plan, does every day, with cleanup included if anything ever gets through. Want the full routine? Read the WordPress maintenance checklist.

Source: Patchstack, State of WordPress Security in 2026.

07

Questions

Will I lose my Google rankings?

Usually not for good, if it’s cleaned up quickly. Rankings tend to come back once Google sees the site is clean and the spam pages are gone.

Can I just restore a backup?

Yes, if the backup is from before the hack and you update everything immediately afterwards. Otherwise the same hole lets them straight back in.

How did they get in?

Most often through an outdated plugin or theme, a reused password, or an old copy of the site that nobody was updating.

Never deal with this again.

Hosting, daily backups, updates and 24/7 security, with cleanup included. No contracts.

See MADE/SECURE