WordPress Security ServicesMalware Removal
Recurring Malware Infections

WordPress Keeps Getting Hacked? Let's Find Out Why.

You cleaned the site, or paid someone to. The scanner said it was clean. A few hours or days later, the same malware is back. That isn't bad luck. It means something on the server is putting it back, or the attacker still has a way in. Finding that "something" is exactly what I do.

$95 for one infected WordPress site

Includes a 1-month hassle-free guarantee. Multiple infected sites are priced separately. Guarantee terms

Sergey, WordPress security specialist
Top Rated 100% Job Success 10 years · 200+ sites cleaned
Sound familiar?SYMPTOMS
  • Same files back within hours or days
    You delete them, and they reappear, sometimes in new folders.
  • Spam posts or admins keep returning
    You remove them, but new ones show up the next day.
  • Scanner says clean, symptoms remain
    Redirects, fake CAPTCHA pages or Google spam continue.
  • A previous cleanup didn't hold
    Your host, a plugin or another freelancer already tried.

Why WordPress malware comes back

Attackers don’t want to lose a site they’ve taken over. So most infections today come with persistence: a second or third way to restore themselves if someone removes the visible malware. If a cleanup removes the payload but misses the persistence, the site is reinfected, often within hours.

In my experience, and in what other WordPress security people report too, it’s almost never one thing. The malware usually has two or three of these working together, each able to restore the others.

Where reinfections usually come from

Source Why it survives a normal cleanup
Must-use plugins (wp-content/mu-plugins) They run on every page load and don’t appear in the normal plugin list
Code in the database Payloads stored in wp_options, including transients and autoloaded options, are written back to disk on the next page load
Startup files A few lines in wp-config.php, object-cache.php or advanced-cache.php that restore the malware before WordPress even starts
Cron jobs WordPress cron events or hosting cron jobs that download the malware again every few hours
Hidden backdoors Small files disguised as core files, images or plugin files, often deep inside wp-includes or uploads
Fake plugins Plugins with believable names (“maintenance toolkit”, “cache helper”) that recreate admin accounts
Other sites in the same account Sites under one hosting user can write to each other’s files, so an uncleaned site reinfects the cleaned one
Logins that still work Old login sessions and WordPress application passwords survive a password change
Saved passwords Malware that recorded logins while the site was infected, so the attacker simply logs in again
An admin’s browser A tab left open in the WordPress dashboard since the infection, or a malicious service worker, that re-uploads the malware when an admin is logged in
The original hole The outdated or vulnerable plugin, theme or nulled software that let the attacker in, still installed

The same files keep getting hacked

A very common version of this problem: one specific file keeps changing. index.php is rewritten every night, wp-config.php gets new lines at the top, or .htaccess files reappear in every folder. Owners search for “index.php keeps getting hacked” or “wp-config keeps getting hacked”, fix the file, and find it changed again the next day.

The file isn’t the problem; it’s the target. Something with write access keeps editing it: a scheduled task, a running PHP process, a backdoor elsewhere on the server, or another site in the same hosting account. If you host a WordPress multisite, an infected subsite can do the same to the whole network. Restoring the file treats the symptom. Finding the process that writes to it fixes the cause. My guide to .htaccess malware in every folder shows how to find what’s recreating files.

Why scanners and quick cleanups miss it

Most cleanups work through a list of infected files. Persistence is designed not to be on that list: it lives in the database, in a startup file, in a cron job, or in an admin’s browser. A scanner also can’t tell you that a sibling site in the same hosting account is the real source, or that an old login session is still active.

That’s why “the scan is clean” and “the site is clean” aren’t the same thing when an infection keeps returning. For a recent real-world example, see my blog post on self-healing malware that rebuilds itself from the database and mu-plugins.

How I stop a reinfection cycle

  1. Map the whole infection. I look at every site in the hosting account, not just the one with symptoms, and record when each malicious file and database entry appeared.
  2. Remove all persistence together. Backdoors, mu-plugins, database payloads, startup code and cron jobs all go at the same time, so none of them can restore the others.
  3. Kick everyone out. I end every login session, revoke application passwords, replace the security keys and remove unknown users, including accounts that look like they belong to WordPress or your host.
  4. Find the way in. Access logs, file dates and the plugin list usually point to it: an outdated plugin, a nulled theme, a file manager plugin, or a leaked password. Then I close it.
  5. Make sure your side is clean too. I’ll ask everyone who uses the dashboard to close old tabs, clear site data in their browser and change saved passwords. It sounds trivial, but it matters.
  6. Watch the site. I check it again after the cleanup, and the 1-month guarantee covers the same infection coming back.

A typical case: a site is cleaned three times in two weeks, once by the host and twice by the owner with a security plugin. Each time the malware returns overnight. The investigation finds three things working together: a must-use plugin that rewrites a fake plugin from a database entry, a hosting cron job that downloads the database entry again if it’s deleted, and an old staging copy of the site in a subfolder that nobody had touched in two years. Removing only one or two of them would have failed again. Removing all three at once, plus the outdated plugin on the staging copy, ended it.

Before you try again yourself

If you’d like one more attempt on your own, follow my step-by-step malware removal guide, and pay particular attention to the database, cron and login sections. And if the malware has already beaten one or two cleanups, that’s usually the point where a fresh, experienced pair of eyes saves you days. Tell me what you’re seeing.

Common Questions

Reinfection FAQ

Why does my WordPress site keep getting hacked after I clean it?

Almost always for one of two reasons. Either something on the server reinstalls the malware (a hidden backdoor, a cron job, code in the database, a must-use plugin, or another infected site in the same hosting account), or the attacker still has a way in: the vulnerable plugin, a stolen password, a valid login session or an application password. A lasting cleanup has to deal with both.

I changed all my passwords. How can they still get in?

Changing passwords doesn't end existing login sessions, and it doesn't revoke WordPress application passwords. Both keep working until you remove them. And if a backdoor file is still on the server, the attacker doesn't need a password at all.

Should I just move to a new host?

Not on its own. If you copy the files and database, you copy the malware with them, and the new host's scanner will usually flag it within days. Clean first, close the entry point, and then move if you still want to.

Should I rebuild the site from scratch?

Sometimes that's the right call, but rarely necessary. A rebuild that copies the old database or uploads folder without checking them can bring the infection along. A careful investigation usually saves the site and finds the real cause, which a rebuild doesn't.

What if it comes back after your cleanup?

Every cleanup includes a 1-month guarantee. If the same infection returns within that month, I investigate and fix it at no extra charge, subject to the guarantee terms.

Break the cycle

Tired of cleaning the same malware again?

Tell me what keeps coming back and what's been tried so far. I'll find what's putting it back and fix the way in.

$95 per infected site · 1-month guarantee · direct contact with the specialist

Request Malware Removal →