My WordPress Site Was Hacked: What to Do in the First Hour

A customer emails to say your site sent them to a casino page. Or Google shows a red “Deceptive site ahead” warning. Or there’s an admin user you’ve never heard of. Your stomach drops.

Take a breath. Hacked WordPress sites are common and fixable. What you do in the first hour decides how long the cleanup takes and whether the hacker gets back in.

Signs your WordPress site has been hacked

  • Visitors (especially on mobile or from Google) are redirected to spam, gambling, or pharmacy sites
  • Google Search shows “This site may be hacked” under your listing, or Chrome shows a red warning
  • Your host suspended the account or emailed about malware or spam sending
  • Unknown admin users in Users → All Users
  • New files or folders you didn’t create, or pages full of spam links
  • Your site suddenly became very slow or your hosting usage spiked

Step 1: Don’t delete anything yet

It’s tempting to start deleting suspicious files. Don’t — not yet. First take a copy of the site as it is now (files and database), using your host’s backup tool. Label it “infected.” This copy matters if the cleanup goes wrong or you need to work out how the hacker got in.

Step 2: Change every password — from a clean device

Hackers often keep a way back in. Change these, in this order:

  1. Your hosting account password
  2. All WordPress admin passwords
  3. SFTP/FTP accounts
  4. The database password (then update it in wp-config.php, or the site will stop loading)
  5. The email account that receives your admin emails

Use a computer you trust — if your own device has malware, new passwords get stolen too. Turn on two-factor login for your hosting account and WordPress admins.

Step 3: Remove unknown users

Go to Users → All Users and filter by Administrator. Delete any account you don’t recognize, and assign their content to your own account. Check other roles too — hackers sometimes create Editor accounts that draw less attention.

Step 4: Tell your host

Your host can often tell you which files were changed and when, and whether other sites on the same account are infected. If they suspended the site, they’ll tell you what they need to restore it.

Step 5: Scan the site

A security plugin such as Wordfence or Sucuri Security can scan your files against the official WordPress copies and flag changed ones. Free scanners catch a lot, but not everything — malware is often hidden in the database or disguised as a normal-looking file.

Step 6: Clean, then close the door

A proper cleanup covers:

  • Replacing WordPress core files with fresh copies
  • Reinstalling every plugin and theme from the official source (and deleting ones you don’t use)
  • Removing malicious code from the database, uploads folder, and .htaccess
  • Updating everything to current versions — an out-of-date plugin is the most common way in
  • Changing the security keys (salts) in wp-config.php so all existing logins are signed out

Restoring a backup is only safe if you know the backup is clean. Many hacks sit quietly for weeks, so last week’s backup may already be infected.

Step 7: Clear the Google warning

If Google flagged your site, sign in to Google Search Console → Security & Manual Actions → Security issues. Once the site is clean, click Request review and explain what you fixed. Reviews usually take from a day to a few days.

When to get professional help

Bring in help if the site handles payments or customer data, if the hack came back after you cleaned it, or if your host has suspended the account. A reinfection almost always means a backdoor was missed.

We clean hacked WordPress sites for $79, and you pay after the site is clean. We use temporary logins and limited access, never your main hosting password — see how we access your site. Chat with us for a quote.

Stop it happening again

Most hacks come through outdated plugins and weak passwords. Our care plans include weekly updates, daily offsite backups, security monitoring, and malware cleanup — 1 simple cleanup per quarter on Starter and unlimited on Business and Store.

Similar Posts