WordPress websites and business systems

Hacked WordPress Site? What to Do Right Now

Signs your site is hacked, what to do in the first hour, how cleanup works, and how to prevent it.

Chris Eggleston
Chris Eggleston WP Mantis
Updated November 14, 2026 /  
Hacked site. What to do right now.

Redirects to spam sites, a Google warning, strange new admin users, or a host suspension notice: if you are seeing any of these, your site has probably been hacked. Do not panic, and do not start deleting things yet. Here is what to do, in order.

Signs your site is hacked

  • Visitors (often only on mobile or from Google) get redirected to another site
  • Google shows “This site may be hacked” or Chrome shows a red warning page
  • Admin users, pages or files you did not create
  • Your host suspended the account for malware or spam sending
  • Search results show your site with spammy titles in other languages

The first hour

  1. Take a backup of the hacked site as it is. It sounds backwards, but it preserves evidence and gives you something to go back to if cleanup goes wrong.
  2. Change passwords: WordPress admins, hosting, SFTP and the database. Use a password manager.
  3. Remove unknown admin users under Users.
  4. Tell your host. They may have logs showing how the attacker got in, and some will help with cleanup.
  5. Do not just restore an old backup and move on. If the hole is still open, the attacker comes right back.

How a proper cleanup works

  1. Scan files and the database for malware (a malware scanner plus a manual look at recently modified files).
  2. Replace WordPress core, plugins and themes with fresh copies from their official sources rather than trying to clean them.
  3. Clean injected code out of the database, wp-config.php, .htaccess and the uploads folder (PHP files there are a red flag).
  4. Find how they got in: usually an outdated or abandoned plugin, a nulled premium plugin, or a stolen password.
  5. Close the hole, then reset all passwords and security keys (salts) in wp-config.php.
  6. Request a review in Google Search Console to remove any warning.

Keep it from happening again

  • Keep everything updated, and remove unused plugins and themes
  • Two-factor authentication for every admin
  • A security plugin with login protection and file change alerts (see our pick)
  • Daily off-site backups (see our backup guide)
  • Never use nulled or “free” copies of premium plugins

Want it cleaned up for you?

Our hack recovery service removes the malware, finds how they got in, closes it, and gets Google warnings lifted. Every Care Plan includes the monitoring and updates that keep it from happening again.

Chris Eggleston
Chris Eggleston
Husband. Father to 4. Grandpa to 2. Gravity Forms enthusiast. As the owner of WP Mantis, I’m on a mission to simplify the WordPress experience for site owners. I also try to bring a unique perspective to the Gravity Forms community at gravityranger.com.
Next step Not sure what your site needs next?

We will look at it properly and tell you the five things worth doing, in order, whether or not you hire us.

Affiliate links disclaimer