Skip to content
Hire me on Fiverr

What to Do If Your WordPress Website Is Hacked (Step-by-Step Recovery)

A clear recovery checklist for what to do if your WordPress website is hacked: stop the spread, clean backdoors, clear Google warnings and prevent repeat attacks.

By , freelance web developer

Updated 3 min read

On this page5 sections
  1. Step 1: Confirm your WordPress website is hacked and stop damage
  2. Step 2: Change every password and check admin users
  3. Step 3: Clean malware, core files and hidden backdoors
  4. Step 4: Clear Google warnings and close the entry point
  5. Common questions when a WordPress website is hacked

Short answer: If your WordPress website is hacked, act in this order: save a backup, turn on maintenance mode, reset all passwords, remove malware and backdoors, update core and plugins, and request a Google Search Console review if a red warning appeared.

Common signs include strange spam pages in Google, redirects to scam sites, unknown admin users or a red “Deceptive site ahead” warning. Panicking and deleting random files usually makes recovery harder. Instead, follow a calm, step-by-step cleanup.

Step 1: Confirm your WordPress website is hacked and stop damage

First, check your site in an incognito window and open Google Search Console under Security & Manual Actions. Next, put the site into maintenance mode so visitors do not hit scam redirects while you clean it.

Before changing anything, save a copy of your current files and database. That gives you a safety net if a needed file gets removed by mistake.

Step 2: Change every password and check admin users

Attackers often leave a hidden admin account behind. Log in to WordPress and remove any unfamiliar users under Users. Then reset passwords for:

  • Your web hosting control panel (cPanel, Plesk or cloud dashboard)
  • All WordPress administrator accounts
  • Your MySQL database and FTP or SFTP accounts

Also update your WordPress security salts in wp-config.php so every active login session is logged out immediately.

Step 3: Clean malware, core files and hidden backdoors

Simply deleting one suspicious file rarely fixes a hack. Attackers hide backdoors inside wp-content/uploads/, fake plugins or modified theme files so they can return a week later.

Replace WordPress core files with fresh copies from WordPress.org, reinstall themes and plugins from official sources, and scan your database for injected scripts. For a full walkthrough, see Google’s hacked site recovery guide.

Step 4: Clear Google warnings and close the entry point

Once clean, update WordPress, every plugin and your PHP version so the original hole stays closed. If Chrome showed a red warning, open Google Search Console, go to Security Issues and click Request Review.

If your WordPress website is hacked right now and you want it cleaned properly, see my website malware removal service. After cleanup, a website security audit or ongoing WordPress maintenance keeps plugins, backups and logins protected.

Common questions when a WordPress website is hacked

Why did my small business WordPress site get hacked?

Most attacks are automated bots scanning for outdated plugins, abandoned themes or weak passwords. They target any vulnerable site, regardless of business size.

How long does it take to remove a Google red warning?

Once all malware and spam redirects are removed and you submit a review in Search Console, Google usually clears the warning within 24 to 72 hours.

Will restoring an old backup fix a hacked WordPress site?

Only if the backup is completely clean and you immediately patch the outdated plugin or weak password. Otherwise, the site will get hacked again.

How do I check my website for malware?

Look for Google warnings, strange redirects, new admin users and files you didn’t add. A scan from inside the site is more reliable, which is what my website security audit does.

How do I secure my WordPress site after a hack?

Update everything, remove unused plugins, turn on two-factor login and keep off-site backups. I list every step in how to secure a WordPress site.

Keep reading

All articles

Website Security

How to Keep Your Website Secure After Launch

Launching your website is just the beginning. As a web developer with over 8 years of experience, here is my practical guide to keeping your website secure, preventing hacks, and protecting your business data.

6 min read

Hire me on Fiverr★ 4.9