BreachHunter
Pricing Blog Log inSign up
● thermal huntscan engines onlineassessment only — no exploits
  1. Home
  2. Blog
  3. WordPress Site Keeps Getting Hacked After Cleanup

Guides · ← All guides

WordPress Site Keeps Getting Hacked After Cleanup

Published: November 19, 2026 · 8 min read

By the Ingenious AI team

The short answer: If your WordPress site keeps getting hacked after cleanup, the cleanup removed the symptom, not the cause. Something is still on the site with the power to put the malware back — a hidden admin account, a fake cron job, a must-use plugin you never installed, or code stored in the database itself. Find that persistence mechanism, remove it, change every password, and then verify the site from the outside. Deleting the visible files again will just restart the clock.

You clean the site. You change the passwords you remember. For a day or two, everything looks fine. Then the redirects are back, or the spam pages are back, or your host emails you again. It feels like the attackers keep breaking in. Usually they are not breaking in at all. They never fully left.

Why deleting files is not enough

Modern WordPress malware is built to survive a file cleanup. Security researchers at Sucuri have documented strains that keep copies of themselves in several places at once, so when one copy is deleted, another copy quietly writes it back. The visible spam file is the least important part of the infection. The important part is whatever has permission to recreate it.

That means a real cleanup is a hunt for persistence, not a hunt for spam. Here are the six hiding places that get missed most often.

The six hiding places

1. Must-use plugins

Files in wp-content/mu-plugins run automatically on every page load, and they do not show up in the normal plugins list the way owners expect. An attacker who drops a file there gets code that runs before almost everything else — and survives theme and plugin reinstalls.

2. Rows in wp_options

The database is a hiding place too. Autoloaded options can carry encoded payloads that get unpacked on each request. A cleanup that only scans files never looks here, which is exactly why attackers use it.

3. WP-Cron jobs

WordPress has its own scheduler. A rogue cron entry can re-download the infection on a timer, so the site looks clean right after you check it and dirty again by morning. Review the scheduled hooks, not just the files.

4. Hidden admin accounts

A second administrator account — sometimes with a name one letter off from yours — is a standing invitation back in. So are application passwords created during the infection. List every admin user and every application password, and remove any you do not recognize.

5. .user.ini and auto_prepend tricks

On many hosts, a .user.ini file can tell PHP to run a chosen file before your site's own code, through the auto_prepend_file setting. One small file in the web root can quietly front-run the whole site.

6. The uploads folder

wp-content/uploads should hold images and media, never PHP. Attackers know cleanup tools often skip it because it is full of legitimate files. Any PHP file in uploads deserves a hard look.

The order that actually ends it

Work in this order. First, take the site offline or put it behind a maintenance page, so you are not cleaning a moving target. Second, hunt the six hiding places above and remove what does not belong. Third, change every credential that touches the site: WordPress admins, the database user, FTP and hosting accounts, and delete application passwords you did not create. Fourth, update WordPress core, themes, and plugins, and remove any theme or plugin you no longer use — the original entry point is often an old, forgotten one. Fifth, and this is the step the whole cycle usually skips, verify from outside. The hub's incident guide covers the whole response sequence — what to do in the first 24 hours when your website is hacked — in the order it has to happen.

Verify from outside — the step that proves it

A scanner that runs inside WordPress reads the site through WordPress. If the infection is still present, it can hide from exactly that kind of check. An external scan has no code on your server and nothing to hide from: it looks at your site the way the public internet does.

That is BreachHunter's honest role here, stated plainly: BreachHunter does not remove malware, and it is not a firewall. It is a website security test that runs from outside your site and reports what is actually exposed — open ports, leaked files, missing headers, TLS problems — with evidence for each finding. Run it after a cleanup and it is a second opinion that does not depend on the health of the site it is checking. If the report is clean and stays clean on a re-scan, your cleanup held. Our explainer on what a website security assessment actually tests covers what that outside view can and cannot see. If the red warning is already up in browsers, read Google blacklist removal next — the order there matters.

Frequently asked questions

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

Because most cleanups remove the visible malware and miss the thing that puts it back: a hidden admin account, a rogue cron job, a malicious must-use plugin, or a backdoor stored in the database. Until that persistence mechanism is gone, the site re-infects itself, sometimes within hours.

Can BreachHunter remove the malware for me?

No. BreachHunter is an external scanner, not a cleanup service and not a firewall. What it does is check your site from the outside, the way an attacker sees it, so you can confirm a cleanup actually worked and catch the exposures that let the infection in.

How do I know the cleanup really worked?

Verify from outside the site itself. Tools that run inside a compromised WordPress install can be lied to by the infection. An external scan checks what the public internet can actually reach: exposed files, open ports, headers, and known-bad paths, with nothing installed on the server.

Run a free BreachHunter scan on your site →

Write the incident timeline while you clean

Mid-cleanup is the worst time to rely on memory, and the timeline is what turns a stressful week into evidence. Keep a plain note as you work: when the compromise was noticed, what you found in each hiding place, what you changed and when, and the password and key rotations with their times. Ten lines is enough.

You will use it three ways. Your host or developer can spot the step that was missed. Your customers get a straight account instead of a shrug. And if the site is flagged again, the timeline is the difference between starting the investigation from zero and starting from 'here is everything that was already ruled out'.

Sources

The authorities this guide is built on, in the form we check our own work against:

  • WordPress.org — FAQ: My site was hacked (2025) — the official cleanup guidance this sequence extends.
  • WordPress Developer Handbook — Hardening WordPress (2025) — file permissions, updates and access controls.
Share this: X · Facebook · LinkedIn · WhatsApp

Related guides

  • Website Security Test: What It Checks, What It Misses, and How to Read Yours · 9 min read
  • Website Security Cheat Sheet: Headers, TLS, Cookies and Exposed Files · 7 min read
  • What a Website Security Assessment Actually Tests · 10 min read
  • TLS/SSL Basics: What Your Certificate Says About Your Site · 8 min read
  • Common Website Misconfigurations (and How to Fix Them) · 11 min read
  • Reading Your First Pentest Report: From Score to Action · 9 min read
  • Deleted ≠ Gone: What the Wayback Machine Keeps After You Delete Your Secrets · 9 min read
  • SQL Injection in Plain English: How One Login Box Can Read Your Database · 9 min read
  • What Does a Website Security Scan Check? · 8 min read
  • Exposed .git Directory: What It Leaks and How to Check · 7 min read
  • Security Headers Missing? What Each Header Stops · 7 min read
  • How Much Does a Penetration Test Cost in 2026? · 7 min read
  • Website Security Checklist for Small Teams (60-second self-check) · 6 min read
  • Reading Your Scan Results: Which Findings Fix First? · 7 min read
  • Content-Security-Policy Missing: What CSP Does and How to Add It Safely · 8 min read
  • HSTS Missing: What Strict-Transport-Security Prevents · 7 min read
  • Clickjacking and X-Frame-Options: How Framing Attacks Work · 7 min read
  • Cookie Flags Explained: Secure, HttpOnly and SameSite · 8 min read
  • Exposed .env File: What Leaks, What Attackers Do Next, What You Do First · 8 min read
  • Directory Listing Enabled: What It Shows Attackers and How to Disable It · 7 min read
  • Mixed Content: Why Your HTTPS Page Still Loads Insecure Resources · 7 min read
  • Expired SSL Certificate: What Breaks, Why Renewal Fails, and How to Catch It Early · 7 min read
  • TLS 1.0 and 1.1 Still Enabled: Why Old Protocols Show Up as a Finding · 7 min read
  • Open Ports on a Web Server: Which Ones Should Never Face the Internet · 8 min read
  • No SPF or DMARC Record: How Missing Email Auth Exposes Your Website · 7 min read
  • Subdomain Takeover: How a Dangling DNS Record Lets Attackers Claim Your Name · 7 min read
  • Forgotten Subdomains: The Staging Site You Forgot Is Still Public · 7 min read
  • WordPress Security Scan: The Exposures an Assessment Finds on WordPress Sites · 8 min read
  • Exposed Backup Files: .bak, .old and .zip Files Sitting in Your Web Root · 7 min read
  • phpinfo() in Production: The Diagnostic Page That Maps Your Server for Attackers · 7 min read
  • Server Version Banners: Why Your Headers Point Attackers to the Right Exploit · 7 min read
  • End-of-Life Software: Running a Server Stack Nobody Patches Anymore · 7 min read
  • CORS Misconfiguration: When Cross-Origin Sharing Opens Your Data to Any Site · 7 min read
  • Open Redirect Vulnerability: How Your Own Domain Sends Visitors to a Phishing Page · 7 min read
  • Dangerous HTTP Methods: What TRACE, PUT and DELETE Should Never Answer · 7 min read
  • Host Header Injection: Poisoned Reset Links and Cache Attacks Explained · 7 min read
  • What Is security.txt? The Small File That Lets Researchers Reach You · 6 min read
  • Admin Panel Exposed to the Internet: What an Assessment Flags and Why · 7 min read
  • phpMyAdmin Exposed: Why This Database Door Is a Prime Brute-Force Target · 7 min read
  • Spring Boot Actuator Exposed: Environment Dumps, Heap Leaks and Shutdown Endpoints · 7 min read
  • Debug Console in Production: The Finding That Can Become Code Execution · 7 min read
  • Exposed AWS Credentials File: The /.aws/credentials Finding, Explained · 7 min read
  • Referrer-Policy and Permissions-Policy: The Two Quiet Headers You Are Probably Missing · 6 min read
  • Exposed package.json: Your Dependency List Is a Recon Gift · 6 min read
  • DNS Zone Transfer Open (AXFR): Handing Out Your Entire DNS Map · 6 min read
  • Certificate Name Mismatch: Why the Cert Does Not Match Your Domain · 6 min read
  • Website Security Assessments for Agencies: Checking Every Client Site Without a Security Team · 8 min read
  • SaaS Security Questionnaires: What Buyers Check About Your Website First · 8 min read
  • Ecommerce Website Security: The Exposures That Put Your Checkout at Risk · 8 min read
  • Small Business Website Security: The Checks That Matter at Your Size · 7 min read
  • How to Prepare for a Website Security Assessment (and Read the Report Calmly) · 7 min read
  • Vulnerability Severity Explained: What Critical, High, Medium and Low Actually Mean · 7 min read
  • Retest After Fixes: How to Prove a Security Finding Is Actually Closed · 7 min read
  • Security Assessment vs Vulnerability Scan vs Pentest: What Is the Difference? · 7 min read
  • How Long Does a Website Security Scan Take? · 6 min read
  • Website Security Drift: Why Last Month's Clean Scan Is Already Out of Date · 7 min read
  • Google Blacklist Removal: Getting the Red Warning Off Your Site · 8 min read
  • VirusTotal Flagged My Site: How to Clear a False Positive · 8 min read

Related from the Ingenious AI suite

  • Ingenious AI — the full suite of security and compliance tools
  • DomainGuard — domain impersonation and typosquat defense
  • See BreachHunter pricing →
BreachHunter · by Ingenious AI · read-only security assessment — scan only targets you own or are authorized to test
About · Contact · Blog · vs Intruder · Privacy · Terms · Security · Threats · Nextcloud Check · Verify Evidence · Help · Redeem
More from Ingenious AI:
DisclosureGuard — AI disclosure compliance · Vibe-Code Audit — AI code security scanner · Rogue-Agent Defense — AI agent firewall · ChatBreaker — AI chatbot red-teaming · ModelMinder — AI model deprecation radar · TermsWatch — AI vendor terms monitor · Agent Flight Recorder — tamper-evident agent audit trails · Agent Auth Gateway — agent credentials & kill switch · DomainGuard — domain impersonation defense · Agent Passport — Know-Your-Agent registry · AgentGate — agent policy publisher · AgentBlock — AI agent & crawler access control · BoundaryVault — agent log forensics · Agentic Receipts — verifiable agent payment receipts · EvalEgress — eval-to-production exposure scan · HomeShield MCP — home AI server exposure check · WireWatch — payment verification ceremony · ADMT Notice Kit — AI decision notice compliance · DueLadder — human-approved invoice chasing · Agent-Ready Store Audit — can AI agents buy from your store · ContentCraft AI — content operations · AgentReady — agent-readiness checks · AI Audit Exchange — AI audit exchange · CallbackShield — callback & webhook protection · CompanionGuard — AI companion safety guardrails · CRAClock — EU Cyber Resilience Act deadline clock · EInvoice Translator — e-invoice format translator · GEOFixer — geo & local listing fixes · MandateGuard — agent spending mandates · OutcomeMeter — AI outcome measurement · ProvenanceGuard — content provenance checks · ReviewDesk — review response desk · ReviewProof — verified review evidence · TakedownCoop — coordinated phishing takedowns · TrustGate — trust & safety gating · BreachHunter — website penetration testing · All 36 platforms — the Ingenious AI portfolio

We use cookies. Necessary cookies keep the site working. With your permission we also use analytics cookies (to understand usage) and marketing cookies (for ads). Read our privacy policy.

NecessaryRequired for login, security and core features. Always on.
AnalyticsHelps us understand which pages are useful.
MarketingUsed for advertising and measuring ad performance.

    No match. Try “pricing”, “php2shell” or “contact” — or press Esc to close.

    ↑↓ navigate · Enter open · Esc close