← All articles

Why Your WordPress Site Gets Hacked Again After Cleanup

Frustrated business owner whose cleaned WordPress site was hacked again

You paid to have your WordPress site cleaned. The suspicious pages disappeared, the warnings went away, and things looked normal again. Then the malware returned.

That’s frustrating, but it doesn’t mean you did anything wrong. A cleanup can remove visible malware without closing the route that let someone in, or without finding every place the attacker left behind. To stop the cycle, the work needs to address both the infection and how access was regained.

Why malware comes back after cleanup

A WordPress site can be reinfected in several ways. Often, more than one issue is involved.

  • The original entry point is still open. An outdated plugin or theme, a weak or reused password, or a vulnerable website component may let someone regain access. Removing malware without fixing the weakness can leave the door open.
  • A backdoor survived. A backdoor is hidden code that gives an attacker a way back in. It may be disguised as an ordinary file or tucked into a location that wasn’t checked. Deleting the malware you can see won’t help if another component can restore it.
  • A malicious administrator account remains. An unauthorized user with administrator access can sign in and change the site again. Not every suspicious account is easy to spot, so check the full user list, not just the accounts you use regularly.
  • The database wasn’t checked. Malware, spam links, or malicious settings can be stored in the database, not only in website files. A file-only cleanup can leave that content untouched.
  • An infected backup was restored. A backup is useful only if it’s clean. Restoring a backup made after the original compromise can bring the problem back.
  • Other access points are still compromised. An attacker may have access to the hosting account, FTP or SFTP, email, DNS, or another connected service. Cleaning WordPress alone won’t secure those accounts.
  • Sessions and keys weren’t invalidated. Changing a password may not end every active session or revoke every separate credential. WordPress security keys and salts help validate login cookies; rotating them invalidates existing cookies, but other credentials and integrations may need separate attention.
  • The site wasn’t hardened after cleanup. If everything is put back online with outdated software, unused plugins, or weak account protections, the same conditions can lead to another compromise.

Illustration of common routes into a website, including an outdated plugin, stolen password, hosting account, and hidden backdoor

How to break the reinfection cycle

A reliable recovery is a sequence, not just a file deletion. If you’re unsure how to handle a step safely, ask your hosting provider or a qualified WordPress security professional for help.

1. Contain the site and preserve a copy

Limit public access while the site is being investigated. Depending on your setup, that could mean putting it into maintenance mode or asking your host to restrict access temporarily.

Before making changes, preserve a copy of the current website files and database in a secure location. Even if the copy contains malware, it may help identify what happened. Don’t treat that copy as safe to restore.

2. Find out how access was regained

Look beyond the obvious malware file. Ask your host to review available logs for suspicious logins, file changes, and unfamiliar activity. Look for changes that happened after the first cleanup, such as a new administrator, a modified plugin, or an unusual scheduled task.

The goal is to answer two questions: How did someone get in? And what could let them get back in?

3. Check every access route

Review who, or what, can access the site and its supporting accounts:

  • WordPress: Check all users, especially administrators, for accounts or email changes you don’t recognize. Review application passwords and remove ones that shouldn’t be there.
  • Hosting: Secure the hosting control panel and any server-management accounts. Ask your host to check whether other sites in the same account may also be affected.
  • FTP, SFTP, and SSH: Remove unknown accounts or keys and reset the credentials you still need.
  • DNS and related services: Check who can change where your domain points, and review connected services such as a CDN or website proxy.
  • Email: Secure the email accounts used for WordPress password resets and hosting administration. If an attacker controls an inbox, they may be able to regain access.
  • Sessions and keys: Sign out users and rotate WordPress security keys and salts. WordPress’s hacked-site guidance explains why password changes are only one part of recovery. Also review other sessions, application passwords, and API credentials separately.

Change credentials from a device you believe is safe. Use unique passwords, and turn on multi-factor authentication for administrative accounts wherever available.

4. Clean both the files and the database

A thorough cleanup checks the whole installation, not just the files reported by a scanner. Suspicious or altered WordPress core files, plugins, themes, configuration files, and hidden folders may all need review. Replace components from trusted sources where appropriate, and remove plugins and themes you no longer use.

The database also needs to be checked for unwanted content, settings, users, and scheduled actions. Make sure any malicious database content that could recreate files is removed as part of the same cleanup.

If you’re restoring from a backup instead, confirm that it predates the compromise and is known to be clean. WordPress’s backup documentation covers the importance of backing up both files and the database.

Illustration of a website cleanup that checks both site files and the database

5. Harden the site before bringing it fully back online

Once the site is clean, close the weakness that allowed the compromise. Update WordPress, plugins, and themes; remove anything unused; and use trusted sources for software. Make sure administrator accounts have only the access they need, with strong unique passwords and multi-factor authentication.

Review file permissions and ask your host about suitable protections for your hosting setup. Set up backups stored separately from the website, and test that you can restore them. WordPress’s security hardening guide provides additional steps for site owners and administrators.

6. Monitor for signs of another attempt

After the site returns online, keep an eye on administrator logins, unexpected file changes, new accounts, and unusual website behavior. Check that backups are completing and that updates are being applied. Monitoring doesn’t replace cleanup, but it can help you catch a problem earlier.

Illustration of a website protected with updated security, revoked sessions, separate backups, and ongoing monitoring

What to ask whoever cleaned it the first time

It’s reasonable to ask for a clear explanation of what was checked and what remains to be done. For example:

  • Did you identify how the attacker got in, or only remove the visible malware?
  • Were both the website files and database checked?
  • Did you review all administrator accounts, hosting access, and other access routes?
  • Were WordPress keys and salts rotated, and were other sessions or application passwords reviewed?
  • Was the backup confirmed clean before it was restored?
  • What was updated, removed, or changed to reduce the chance of another compromise?
  • What should I monitor, and what should I do if suspicious activity returns?

A useful answer should describe the work in plain language, including anything that couldn’t be confirmed. If malware keeps returning or the cause is unclear, The Hack Remover can help investigate the reinfection and secure the routes that may still allow access. Our guides to removing malware from WordPress and spotting a hacked site go deeper on what to look for.

A site being cleaned once is not always the same as a site being secure again. Finding the way back in, checking every access route, cleaning files and the database, and then hardening and monitoring the site can help break the cycle.

Talk with RachelAI receptionist · 613 706 8145