Skip to content
WordPress May 14, 2026 12 min read

WordPress Hacked? Malware Removal and Repair That Holds

WordPress site hacked or infected with malware? Contain it in the first hour, clean files and database properly, close the way back in and clear Google's warning.

Site hacked or infected with malware right now? Skip the guesswork and get emergency WordPress support: a senior engineer hands-on with your site within the hour, $99 flat. Get help now →
Parameter
Parameter
Author

A hacked WordPress site rarely fails in one obvious way. More often, it starts with something small – spam pages in search results, an admin user nobody recognizes, a sudden redirect on mobile, a plugin update that now throws a fatal error. By the time someone says, “we need wordpress hacked repair,” the problem usually goes deeper than one infected file.

That’s the part most businesses miss. A hack is not just a cleanup task. It’s an operations failure with technical symptoms. If your site drives leads, donations, sales, or client trust, treating it like a one-off malware sweep is how you end up paying for the same incident twice.

Quick answer: if your WordPress site is hacked, take a full backup of the infected site for evidence, change every password (WordPress admins, hosting, SFTP, database), and remove admin users you don’t recognize. Then clean it: replace WordPress core, plugins and themes with fresh copies, remove unknown files and injected code from uploads and the database, update everything, and find how the attacker got in. Last, ask Google to review the site in Search Console if it was flagged. Restoring a backup alone usually isn’t enough, because the way in is still open.

Confirm It’s Actually Hacked

“Hacked” covers a lot of ground. The common versions:

  • Defacement: your homepage is replaced with someone else’s content.
  • Pharma or spam pages: hundreds of spam pages show up in Google for your domain while the site looks normal when you visit it.
  • Redirect hack: visitors, often only those coming from Google or on mobile, get sent to gambling or phishing sites.
  • Backdoor: an admin account you didn’t create, or files changed when nobody on your team changed anything.
  • Hidden SEO spam: links injected into pages that you only see in the source code.
  • Google Safe Browsing warning: a red warning page before your site loads.

What wordpress hacked repair actually means

A proper repair has three jobs. First, contain the incident so the damage stops spreading. Second, restore the site to a known-good state without reintroducing the compromise. Third, fix the conditions that made the breach possible in the first place.

Plenty of vendors only handle the middle step. They remove visible malware, get the homepage loading again, and call it done. That can be enough for a hobby site. It’s not enough for a law firm with intake forms, an e-commerce store with revenue on the line, or a nonprofit heading into a campaign.

WordPress gets blamed for a lot, and honestly, some of it is earned. But most hacked sites are not taken down by some movie-grade zero-day. They’re taken down by familiar operational gaps: old plugins, abandoned themes, reused credentials, poor hosting controls, no staging, no tested backups, and too many people with admin access because nobody wanted to say no.

First priority: stop making it worse

The first few hours matter because well-meaning teams often destroy evidence or spread the compromise. Someone updates five plugins on the live site. Someone restores a backup from three weeks ago without checking whether the backdoor was already present. Someone shares admin passwords over email. Now you have a security incident and a process problem.

Containment usually means changing passwords, rotating keys, restricting access, putting the site behind maintenance if needed, and preserving enough of the environment to understand what happened. If the site is handling payments, memberships, donor data, or private form submissions, you also need to think beyond WordPress itself. Connected systems may be part of the blast radius.

This is where business context matters. If your site is a brochure with a contact form, your risk is one thing. If it feeds leads into CRM, syncs orders to ERP, or supports client portals, the repair has to account for downstream impact. A compromised plugin on the web side can become a much bigger problem when nobody maps the integrations.

The first-hour checklist

  1. Don’t delete anything yet. The infected files are your trail to how they got in.
  2. Contain it. Change every password (WordPress admins, SFTP, hosting panel, database), log out all sessions, remove admin accounts you don’t recognize, and put up a maintenance page if visitors are being redirected.
  3. Scan. Compare core, plugin and theme files against clean copies (Wordfence does this), run an outside check such as Sucuri SiteCheck, and ask your host for a server-level scan. Look in wp-content/uploads, .htaccess and oddly named theme files.
  4. Clean. Restore a pre-hack backup to staging and verify it, or replace core, reinstall plugins fresh from the repository and check theme files and the database for injected code.
  5. Harden. New security keys in wp-config.php, two-factor on every admin, a firewall, sane file permissions and DISALLOW_FILE_EDIT.
  6. Request review. See below.

Dealing with an active hack right now? Get a human on it: hacked WordPress site help →

The real work in WordPress hacked repair

Once the immediate risk is contained, the repair work starts. That means identifying what changed, what should not be there, and what can be trusted.

The cleanest path is often rebuilding from a verified good codebase while preserving legitimate content and configuration. That is different from poking through random files and deleting suspicious strings until the site appears normal. Hackers count on surface-level cleanup. Hidden admin users, scheduled tasks, injected database entries, altered core files, and backdoors buried in uploads or mu-plugins are common because they survive sloppy remediation.

A serious repair process checks the database, file system, users, cron jobs, configuration files, and hosting environment. It also reviews logs if they exist, because the path in matters. If the compromise started with a nulled plugin or a forgotten file manager plugin, that tells you something. If it came through weak credentials and no MFA, that tells you something else. Same hacked site, different repair plan.

There’s also a trade-off between speed and certainty. If you need the site back up before a launch or board meeting, you may prioritize a fast restore behind tighter controls while a deeper forensic review continues. That’s reasonable. What’s not reasonable is pretending a rushed cleanup is the same thing as a completed incident response.

Why backups don’t always save you

Everyone says they have backups. Fewer teams can tell you whether those backups are tested, isolated, recent, and clean.

A backup is useful only if you know three things: when the site was compromised, whether the backup predates it, and whether the restore process actually works. Many businesses find out too late that their last usable backup is either broken or already infected. Others restore successfully, only to see the site re-hacked because the original access path was never closed.

That’s why tested backups matter more than backup checkboxes. A green icon in a hosting panel is not a recovery plan.

WordPress Malware Removal: The Cleanup Paths That Work

The worst first move is the one most people make: deleting random files and updating plugins while the site is still compromised. It feels productive, but it destroys evidence, breaks recovery paths and gives the malware a chance to re-trigger. Take a full file and database backup of the infected state first, so you can compare timestamps and find how the attacker got in.

Then look past the homepage. Common tells: new admin users, modified core files, strange cron jobs, unfamiliar plugins, altered .htaccess rules, PHP files sitting in wp-content/uploads, and database entries holding obfuscated JavaScript, hidden iframes or SEO spam pages that aren’t in your navigation but are indexed.

There are two real cleanup approaches:

  • Restore a known-clean backup. Fastest when you have disciplined retention and know when the compromise started. If your backups are untested, incomplete or already infected, you are rolling back to a quieter version of the same problem; restore to staging and verify before going live.
  • Clean the existing site manually. Compare core files to a fresh copy, reinstall themes and plugins from trusted sources, remove rogue files, inspect the database, and check user accounts and scheduled tasks. Slower, and slower still on heavily customized sites where nobody knows what “normal” looks like, but often necessary.

On a revenue- or lead-critical site (custom forms, checkout, CRM connections, old agency code), one wrong deletion can take down lead capture or break checkout, and one missed indicator leaves the attacker in place. That is where DIY malware removal usually breaks down.

Why malware keeps coming back

Reinfection usually means the cleanup focused on files and ignored access. Attackers don’t need the same payload if they still have a valid admin account, a vulnerable plugin, or SFTP credentials sitting unchanged on three laptops. Reset passwords broadly (WordPress admins, hosting panel, SFTP, database users, and the email accounts used for password recovery) and end active sessions, not just the password. Then deal with plugin and theme hygiene: abandoned extensions, nulled themes and one-off snippets in production are an attack surface, not a maintenance backlog.

What usually gets missed after the malware is gone

The visible malware may be gone while the real risk remains. That’s common when repair is handled as a task instead of an operating model.

Credentials need to be rotated broadly, not just for WordPress admins. Hosting, SFTP, SSH, database users, CDN access, DNS, and transactional email accounts all matter. If a former freelancer still has access to part of the stack, your cleanup is incomplete.

You also need to review the software footprint with some honesty. Businesses inherit weird WordPress environments all the time – page builders stacked on old themes, duplicate SEO plugins, “temporary” code in production, mystery snippets from agencies that vanished two years ago. A hacked site exposes that debt. If nobody cleans it up, the same mess remains waiting for the next incident.

Repair without hardening is just a pause

This is where most one-time vendors stop. The site is back, the invoice is sent, and everybody hopes the problem was isolated. Then the next update breaks something, monitoring is still absent, and no one notices suspicious activity until search traffic falls off a cliff.

Hardening is not glamorous, but it’s what keeps you out of repeat incidents. That includes safe update workflows, least-privilege access, staging for changes, monitored uptime and errors, tested restore procedures, plugin review, and clear ownership. Not “our marketer can usually handle it.” Ownership you can defend in a meeting.

If that sounds more like site operations than emergency repair, that’s the point. WordPress hacked repair should end with a more controlled environment than the one that got compromised.

Get the Google Warning Removed

If Google flagged the site, request a review in Search Console under Security Issues once the cleanup is done. Google usually reviews within about 72 hours. If your host or a blocklist flagged you, send their abuse team evidence of the cleanup. For the file-by-file cleanup itself, see WordPress malware removal above. For why this keeps happening to business sites, see why WordPress sites get hacked.

When to repair and when to rebuild parts of the site

Not every hacked site needs a full rebuild. Some do need parts replaced.

If the codebase is mostly standard, the plugins are maintained, and the compromise is contained, repair is often faster and more cost-effective. But if the site is built on abandoned themes, custom code nobody understands, and a plugin stack held together by habit, repair can become expensive theater. You can clean it, yes. You may still be left operating a fragile system.

The practical call is to separate what must be restored now from what should be reworked next. Keep revenue and critical communication moving. Then reduce the technical debt that made the incident harder than it needed to be. You don’t need to rebuild everything. You do need to stop pretending unstable architecture is acceptable because it has “worked so far.”

How businesses should evaluate a repair partner

If you’re hiring outside help, ask how they verify the site is clean, what they review beyond WordPress files, how they handle credentials and access after the repair, and what documentation you’ll get at the end. If the answer is basically “we run a scanner and clean the malware,” keep looking.

You want a team that thinks in terms of recovery, accountability, and recurrence prevention. That means clear scope, visible actions, and a handoff that leaves your organization in better shape than before the incident. A post-hack scramble is a bad time to discover you hired another break-fix vendor.

For organizations where WordPress is operationally important, this is also the moment to clean up governance. Decide who approves changes, who gets admin access, how updates are tested, where backups are stored, and who owns incident response. Parameter often gets called after the immediate panic, when the deeper issue becomes obvious: the hack was real, but the bigger problem was that nobody was truly operating the site.

A hacked site can be repaired. Trust can be rebuilt too, but it takes more than deleting malware and hoping for a quiet month. The useful question isn’t whether your WordPress site can be cleaned. It’s whether, after the repair, you’ll finally run it like something the business depends on.

WordPress Hacked FAQ

How do I know if my WordPress site has been hacked?

The common signs are spam or pharma pages showing up in Google for your domain, visitors being redirected to other sites (often only on mobile or from Google), admin users nobody created, files that changed when nobody changed anything, a red Google warning page, or your host suspending the account for malware. Run a Google search for site:yourdomain.com and look for pages you didn’t write.

Can I remove WordPress malware myself?

Yes, if you are comfortable with SFTP, the database and reading code. Replace core, plugin and theme files with clean copies, remove unknown files, check the database for injected scripts and unknown admins, and change every password. The hard part is finding the way in and every backdoor; miss one and the malware comes back within days.

What does a WordPress malware removal service do?

A good one cleans the files and the database, closes the hole the attacker used, removes backdoors, rotates every credential, gets Google and host warnings lifted, and tells you in writing what happened. A scanner on its own only finds what it recognizes. Parameter’s emergency WordPress support starts with a $99 flat, 60-minute session: hacked sites get cleaned and locked down first, then you get a plain-language summary of what else needs work.

Will restoring a backup fix a hacked WordPress site?

Only if the backup is from before the hack and you also close the hole that let the attacker in. Many backups already contain the malware, because sites are often compromised weeks before anyone notices. Restore, then update everything, change every password and check for unknown admin users.

How long does it take to clean a hacked WordPress site?

A simple infection can be cleaned in an hour or two. A site with many backdoors, spam pages in Google, or a host suspension takes longer, and Google’s review of a security warning usually takes a few days after you request it.

Why does my WordPress site keep getting hacked?

Usually because the first cleanup missed a backdoor, an outdated plugin or theme is still installed, or a stolen password was never changed. See why malware keeps coming back and why WordPress sites get hacked.

Want WordPress to feel handled?

Self-serve onboarding takes minutes. Parameter takes care of the rest, hosting, ops, and improvements when you need them.