Skip to content
TatiCreative
All articles

· 7 min read · Mert Tati

My WordPress Site Was Hacked: What Should I Do? A Step-by-Step Emergency Guide

WordPress site hacked? Don't panic. Maintenance mode, new passwords and salt keys, an admin audit, cleanup and Search Console review, step by step.

Short answer: stay calm and work through it in order. Put the site into maintenance mode, notify your hosting provider and back up the site as it is now, change every password and the security keys in wp-config.php, and audit your administrator accounts and application passwords. Get your host's support team or a professional to clean out the malicious code, consider restoring a clean backup, and finally request a review in Google Search Console.

Broken padlock under a red emergency light, a hacked website

How can you tell your site has been hacked?

  • There's an administrator account you don't recognize, or the email address on your own account has changed.
  • Visitors are being redirected to other sites, gambling pages or fake stores, often only on mobile or only when they arrive from Google.
  • Google search results show foreign-language titles under your site, or a “This site may be hacked” warning.
  • There are plugins, themes, files or scheduled tasks you didn't add.
  • Your host has warned you about malware or bulk email sending, or server load or email traffic has suddenly spiked.

None of these signs is conclusive proof on its own, but if you see two of them together, the safest move is to act as if you've been hacked.

Step-by-step emergency response

  • 1. Take the site offline: Protect visitors and search engines by temporarily switching the site to maintenance mode or restricting access from your hosting panel. If you run a store that takes payments, pause orders.
  • 2. Notify your hosting provider: Many hosts offer server-level malware scanning, cleanup support or backups from previous days. Their access logs are key to understanding how the attacker got in.
  • 3. Back up the current state: Take a file and database backup of the hacked site too. If real content gets deleted by mistake during cleanup, or an investigation is needed, you'll have it on hand. Don't mix this backup up with your clean ones.
  • 4. Change every password: WordPress administrators, hosting panel, FTP/SFTP, the database user (update it in wp-config.php as well) and any email accounts tied to the site. Do this from a clean device if you can.
  • 5. Regenerate the security keys (salts): Replace the 8 security keys in wp-config.php with fresh ones from WordPress's official salt generator. The moment you save, every session is logged out, including any session the attacker still has open. Note: if you use 2FA in Hushfort, the secret keys are encrypted with these salts, so changing them disables every user's 2FA; each administrator must set 2FA up again after the cleanup.
  • 6. Audit administrator accounts: Filter the Users list by the Administrator role. Delete accounts you don't recognize and downgrade the role of suspicious ones. When deleting, attribute their content to an account you trust.
  • 7. Revoke application passwords: Open the Application Passwords section in each administrator's profile and revoke every password you don't recognize or don't use. Application passwords can keep working through the REST API even after the main password changes.
  • 8. Leave the cleanup to a professional: Malicious code rarely sits in just one place; it spreads across core files, theme files, the uploads folder, the mu-plugins directory, the database and scheduled tasks. Restoring a clean backup, reinstalling core and plugins from official sources and scanning the remaining files is the part of the job that takes real expertise.
  • 9. Update everything: Update core, themes and plugins, and delete anything you don't use. The attacker most likely got in through an outdated component or a weak password; leave that door open and they'll be back.
  • 10. Check Google Search Console: Look at the Security Issues report, make sure the flagged URLs have been cleaned and submit a review request. Also check that the attacker hasn't added their own account as an owner in Search Console.

Why does a clean backup matter so much?

Emergency kit, incident response

Cleaning a hacked site file by file is possible, but it's exhausting, and there's always a chance a backdoor slips through. If you have a backup from before the attack that you know is clean, restoring it and then handling passwords, keys and updates is often the fastest route. You may need to move over data added after the backup, such as orders and new content, separately. If you don't have backups, setting them up should go at the top of your to-do list once the site is recovered.

Hushfort's “If an account was compromised” guide

The Overview panel of the Hushfort plugin includes a recovery card titled “If an account was compromised.” When you spot a suspicious administrator, an unknown login or a changed admin email, the guide walks you through these steps in order:

  • Create a new administrator account with a different, hard-to-guess username and a strong password. This is your clean recovery door.
  • Verify the new account: log out, log back in as the new administrator and confirm it has full privileges; only then touch the old one.
  • Delete the compromised administrator and attribute its content to the new account, or, if you prefer, downgrade its role to Subscriber instead of deleting it.
  • Change all remaining administrator passwords and turn on two-factor authentication.
  • Regenerate the 8 security keys in wp-config.php to log out every session.
  • Hunt for backdoors: unexpected administrators, plugins or themes you don't recognize, hidden scheduled tasks and recently modified files.
  • Close the door: run the Surface Scan and close every point left open; make sure the Hide Login, Limit Login and 2FA layers are all active.

To be clear: Hushfort is not a malware scanner or cleaner. It doesn't scan files, monitor file changes or take backups. The backdoor-hunting step in the guide is a check that you, or the team supporting you, carry out. Hushfort's job is to get the account side back under control and keep the same door from opening again.

Preventive layers so it doesn't happen again

The most common way attackers get in is through stolen or guessed administrator passwords. Hushfort narrows that path with several layers:

  • Two-Factor Authentication: even if a password is stolen again, the login stops there; recovery codes can be downloaded and printed.
  • Limit Login & Alerts: failed logins get locked out, repeat offenders get longer lockouts, and you get an email the moment a lockout happens. The History tab shows which IP, which username and which source (login page, XML-RPC, REST) each attempt came from.
  • Hide Login and Surface Hardening: wp-login.php, XML-RPC logins and username leaks are shut down; application passwords can be disabled entirely if you wish.
  • Spam Shield, Registration Protection and Load Protection: form spam, fake sign-ups and request floods are stopped before they put load on your server.

You'll find how to configure login limits in our post on blocking WordPress brute force attacks, and all the layers together in our how to secure a WordPress site checklist. For malware scanning, a firewall and backups, plan a separate solution on the hosting and infrastructure side.

When do you need professional help?

Get professional help if visitors are being redirected, if the site handles payments and customer data, if you have no clean backup, or if the problem comes back after cleanup. If customer data may have been affected, you may have notification obligations; check with your legal advisor for the current regulations. Our Izmir-based team's software, hosting and maintenance service helps in exactly these situations: getting the site back on its feet, ongoing updates and security maintenance, plus daily backups and monitoring.

Frequently asked questions

Is changing my password enough? No. An attacker can come back through an open session, a separate admin account, an application password or a backdoor left in your files. Change your password alongside regenerating the salt keys, auditing accounts and cleaning up.

Is it better to delete the site and rebuild it? If you have a clean backup, restoring it is usually faster. Without one, you can reinstall core and plugins from official sources and carefully migrate your content; malicious entries in the database need to be checked separately as well.

When does Google's “hacked” warning go away? Once you've finished cleaning up and submitted a review request in Search Console, Google re-evaluates the site. How long that takes varies; make sure the cleanup is truly complete before you send the request.

Would a security plugin have prevented the hack? 2FA, login limits and disabling XML-RPC stop most login-based attacks. But a login-focused plugin won't stop an attack that comes in through a vulnerability in an outdated plugin; for that you need regular updates and a server-level firewall.

In short: put the site into maintenance mode, notify your host and take a backup, change every password and the salt keys, and audit administrators and application passwords. Leave malware cleanup to an expert, consider restoring a clean backup, request a review in Search Console, and use 2FA, login limits and a reduced login surface to keep the same door from opening again.

More articles

Request a call

Describe your project in 60 seconds.

Fill in the short pre-form; we'll match you with the right person and reply within 24 hours.

A native English-speaking Project Lead from our team runs your project with you.

01 / 04

Which areas do you need help with?

  • UI/UX & Product Development
  • AI Solutions
  • Graphic & Brand Design
  • Software & Hosting
  • Studio & Production
  • Social Media
  • Digital Marketing
  • Digital Transformation
  • Industrial IoT (IIoT)
Average response time< 24 hours