Malware Scanning & Removal: A Website Owner’s Guide

Detection, Tools & Cleanup

Malware Scanning & Removal: A Website Owner’s Guide

How to actually confirm an infection, which scanners are worth using, how to clean it out yourself when that’s realistic, and how to know it’s genuinely gone

📖 ~3,700 words 🔬 Tools & techniques ⚡ Updated 2026

A security checklist tells you what to lock down before anything happens. A full incident-response guide tells you what to do once you’re sure you’ve been breached. This page sits in between: the part where you suspect something is wrong, need to find out for certain, and have to actually locate and remove whatever’s living in your files — using the right tool for the job instead of guessing.

If you’ve already confirmed a breach and need the full ordered response — containment, credential rotation, entry-point patching, clearing Google’s warnings, legal notification — that’s covered start to finish in our website security breach recovery guide. This page goes deep on one piece of it: detecting malware accurately, choosing scanning tools that actually find it, and cleaning it out without leaving something behind.

🔗
How These Two Guides Fit Together

Use this guide to detect an infection, pick scanning tools, and learn the cleanup techniques. Once you’re ready to run the full incident response — containment, credential rotation, patching the entry point, clearing warnings — switch to the breach recovery guide. Section 7 below marks exactly where that handoff happens.

1. Signs Your Site May Be Infected

Some infections announce themselves with a browser warning. Many don’t — a lot of malware is designed specifically to stay quiet on the front end while doing its work elsewhere. These are the more technical, more specific signals worth watching for beyond the obvious “Google flagged me”:

  • Unexpected outbound traffic or resource spikes — a jump in outbound email volume, bandwidth, or CPU usage that doesn’t match your own activity is a classic sign of a site sending spam, mining cryptocurrency, or feeding a botnet
  • Unfamiliar files with recent modification timestamps — sorting your file listing by modified date and finding files you didn’t touch, especially in wp-content/uploads, theme directories, or the site root, is one of the most reliable early tells
  • Your domain shows up in Google’s index with content you never wrote — searching site:yourdomain.com and finding spam, pharma, gambling, or counterfeit-goods pages is the “Google Search listing hack” pattern, where injected pages are often shown only to Googlebot and hidden from normal visitors (cloaking)
  • Browser warnings on your own domain — “Deceptive site ahead,” “This site may be hacked,” or similar, in Chrome or Safari
  • Blocklist status — your domain or IP appearing on Google Safe Browsing, Norton Safe Web, or a spam blocklist, sometimes discovered only when a visitor reports it or your email bounces
  • Unexplained new admin users, scheduled tasks, or files mimicking legitimate core files — a file named almost identically to a real WordPress core file, off by one character, is a common disguise technique
  • Visitors reporting redirects you can’t reproduce yourself — another cloaking pattern, where the redirect only fires for certain visitors (mobile users, or those arriving from search)

Any single item can have an innocent explanation. Several together, or any one paired with an external warning from Google, your host, or a visitor, is worth treating as a real infection until you’ve ruled it out.

2. Confirm It’s Malware, Not Something Else

Before you start ripping out files, it’s worth ruling out the non-malicious explanations that produce similar symptoms — chasing a phantom infection wastes time and, if you delete the wrong thing, can break a perfectly clean site.

  • A plugin or theme conflict can produce broken layouts, PHP errors, or unexpected redirects that look alarming but have nothing to do with an attacker — deactivating plugins one at a time on a staging copy is a fast way to check
  • A bad update to your CMS core, a plugin, or your PHP version can break functionality in ways that mimic defacement or broken pages
  • Caching or CDN issues can serve stale or mismatched content that looks like unauthorized changes but is just an outdated cached copy — clearing your cache before investigating further saves a lot of false alarms
  • Scanner false positives happen — heuristic and signature-based scanners occasionally flag legitimate code (minified JavaScript, certain theme frameworks, or plugins that use eval() or obfuscation for legitimate licensing reasons) as suspicious. A single scanner flag on one file, with no other symptoms, warrants a manual look before you conclude you’re compromised
💡
Cross-Check Before You Panic

If a scanner flags something but you see no other symptoms from Section 1, run a second, different scanner (Section 3) before assuming it’s a false alarm or a confirmed infection. Two independent tools agreeing is a much stronger signal than either one alone.

3. Free & Built-In Scanning Tools

Before installing anything or paying for a service, several free tools can confirm or rule out an infection in minutes.

  • Google Search Console’s Security Issues report — if Google’s crawlers detected malware, injected spam, or deceptive pages, this report (under Security & Manual Actions) names the specific issue and example URLs. It’s the same report the breach recovery guide covers requesting a review through, once you’ve cleaned up.
  • Google Safe Browsing’s site status checker — at transparencyreport.google.com/safe-browsing/search, this checks any domain’s current blocklist status directly, useful when you don’t have Search Console access to a site yet
  • VirusTotal — submitting your domain or a suspicious URL runs it against dozens of antivirus and blocklist engines at once, a fast way to see whether multiple vendors are flagging you, not just one
  • Host-bundled scanners — many hosting providers (including several this site reviews) run a scanner automatically at the account level, most commonly Imunify360 or its lighter free counterpart, ImunifyAV, integrated into cPanel. Check it first if your host includes one — it’s already scanning on a schedule
🔍
Free Tools Confirm; They Don’t Always Find Everything

These tools are excellent for a fast first pass and for confirming what Google or your host already sees. They’re generally weaker at finding custom or obfuscated backdoors that don’t match a known signature. If they come back clean but your symptoms from Section 1 persist, move on to Sections 4 and 5 rather than concluding you’re in the clear.

4. Security Plugins for WordPress & Other CMS

A dedicated security plugin generally scans more thoroughly and more often than a host’s baseline scanner. Feature splits and pricing on all of these change fairly often, so treat the specifics below as directional and check each vendor’s current plans before deciding.

  • Wordfence — free version includes a firewall, a malware scanner checking core files, themes, and plugins against known-good copies, and login-security features like two-factor authentication. The free firewall’s threat updates lag (commonly around 30 days) behind premium’s real-time feed, and premium adds real-time IP blocklisting, country blocking, and more frequent scans.
  • Sucuri — the free SiteCheck scanner is a remote, no-install web scan for visible malware, blocklist status, and known spam. The paid Website Security Platform adds server-side file scanning that can see hidden backdoors a remote scan can’t, plus continuous monitoring and a cleanup service; Sucuri advertises unlimited cleanups on every plan and a 30-day guarantee with that paid platform.
  • MalCare — built around fast, off-server scanning. Its free tier detects malware but doesn’t remove it — MalCare is upfront that removal requires a paid plan, which also adds instant cleanup, more frequent scans, and virtual patching for known vulnerabilities.
  • Kadence Security (the plugin formerly known as iThemes Security, then Solid Security, following Liquid Web’s 2026 consolidation into the Kadence WordPress suite) — leans more toward hardening (brute-force protection, file change detection, backups) alongside scanning, worth comparing if prevention matters more to you than cleanup tooling.

Read the specific file paths and detections each tool reports rather than clicking “clean” blindly — especially before letting an automated tool delete or modify a file you can’t otherwise account for.

5. Server-Level & Command-Line Scanning

With SSH access to a VPS or dedicated server, command-line tools can go places browser-based and plugin-based scanners can’t — worth using even after a plugin scan.

ClamAV

ClamAV is a free, open-source antivirus engine that runs directly on your server. It’s signature-based, so it’s strongest against known malware and weaker against brand-new or heavily custom-obfuscated code — use it alongside, not instead of, the pattern-searching below.

TerminalRecursive scan, list infected files only
# scan a directory recursively, showing only infected matches
clamscan -r --infected /home/username/public_html

# move anything infected to a quarantine folder instead of deleting outright
clamscan -r --infected --move=/home/username/quarantine /home/username/public_html
⚠️
Don’t Use –remove on a Live Site

ClamAV’s own documentation warns against automatically deleting flagged files on anything but a dedicated upload/download scanning folder — false positives happen, and an automatic delete on a live site can break something that wasn’t actually malicious. Quarantine with --move, review what was flagged, then remove manually.

WordPress Core File Verification

If you run WordPress and have WP-CLI available, wp core verify-checksums compares your live core files against the official checksums published by WordPress.org — any core file that’s been modified (a common way attackers hide a backdoor inside a file that looks legitimate) will show up as a mismatch.

TerminalWP-CLI
# verify installed core files against WordPress.org's published checksums
wp core verify-checksums

# output as JSON if you want to script a comparison
wp core verify-checksums --format=json

A clean result prints success; a compromised install lists the specific files that don’t match, which is a direct lead on where to look. Note this only covers WordPress core — it won’t catch malware injected into a plugin, theme, or the uploads directory, which is where infections most often actually live.

Searching for Signature Patterns

A large share of injected PHP malware relies on obfuscation to hide from casual inspection — most commonly, encoding the malicious payload so it doesn’t read as recognizable code, then decoding and executing it at runtime. A widely documented pattern to search for is code that pairs PHP’s eval() function with base64_decode(), since that combination has little legitimate use in typical theme or plugin code:

TerminalIllustrative signature search only
# search recursively for a common obfuscation pattern
grep -r -l "eval(base64_decode" /home/username/public_html

# broaden to a couple of other commonly abused function pairings
grep -r -lE "eval(|base64_decode(|gzinflate(" /home/username/public_html --include=*.php
🎯
Expect False Positives Here Too

Some legitimate plugins and frameworks use these same functions for licensing checks or legitimate compression, so a match isn’t automatic proof of infection — it’s a lead to manually inspect that specific file. Compare the file against a known-clean copy of the same plugin/theme version before deciding it’s malicious.

6. Common Malware Types & Where They Hide

Knowing what you’re likely looking for narrows the search considerably. These are the patterns website owners run into most often:

TypeWhat It DoesTypical Location
SEO spam injectionHidden links or pages promoting pharma, gambling, or counterfeit-goods spam, often shown to Googlebot but hidden from visitorsTheme header/footer files, database post content, hidden new posts
Malicious redirects / cloakingSends some visitors (often mobile, or arriving from search) to an unrelated site while showing normal content to others.htaccess, theme functions.php, injected JavaScript
Cryptomining scriptsRuns mining code in visitors’ browsers or consumes server CPU directly, often noticed as a performance spike firstInjected <script> tags, cron jobs
Backdoors / webshellsA hidden script giving ongoing remote access, independent of the original vulnerability — why “cleaned” sites often get reinfected if this is missedUploads folders, near-identical filenames to core files
DefacementVisibly replaces content, usually a political statement or attacker calling-card — rarely the only thing presentHomepage template, index file
Credential-stealing / phishing injectionFake login or payment pages inserted to harvest credentials or card dataNew subdirectories, cloned checkout/login templates

It’s common to find more than one of these at once — a backdoor is frequently what let the attacker install the SEO spam or cryptominer in the first place, so finding one type is a strong reason to keep looking for the others rather than stopping at the first thing you clean.

7. Manual Cleanup Steps

This section assumes containment is already handled — the site is offline or in maintenance mode, your hosting password has already been changed, and you’ve preserved a copy of the infected state for reference. If you haven’t done those yet, stop here and complete Steps 1–2 of the breach recovery guide first; credential rotation and entry-point patching from that same guide still need to happen after cleanup, regardless of how the malware itself gets removed.

1

Isolate a working copy

Work from a copy of the site (staging, or a local copy pulled via SFTP), not the live production files, so a mistake during cleanup doesn’t take down a site that’s already struggling.

2

Scan with more than one tool

Run your CMS security plugin’s scan, a free remote scanner like Sucuri SiteCheck or VirusTotal, and ClamAV if you have server access (Sections 3–5). Different tools rarely flag the exact same issues — overlap is a strong confidence signal, and anything only one tool catches is worth a manual look before you act on it.

3

Identify and quarantine flagged files

Move (don’t immediately delete) everything flagged as malicious into a separate folder outside the web root, so nothing continues executing while you finish investigating, but nothing is lost if a flag turns out to be a false positive.

4

Search legitimate files for injected code

Not all malware lives in its own file — a common technique appends malicious code to the end of an otherwise normal-looking file (a theme’s functions.php is a frequent target). Run the checksum verification and grep searches from Section 5 against your active theme and plugins, comparing flags against a known-clean copy of the same version rather than assuming the whole file is bad.

5

Hunt specifically for backdoors

A missed backdoor is the single most common cause of near-immediate reinfection, so treat this as its own dedicated pass rather than assuming Step 2’s general scan covered it. Check uploads folders (which typically shouldn’t contain executable PHP at all), filenames nearly identical to real core files, and anything with an unexplained recent modification date that survived the earlier scans.

6

Remove confirmed malicious files and code, then re-scan before going live

Once you’re confident in what’s actually malicious versus what was a false positive, remove it for real. Then run the scans from Step 2 again on the cleaned copy — not just once, since it’s the step most people skip when they’re relieved to be done. A clean second scan is what lets you move to Section 8 with confidence instead of hope.

🚪
Cleanup Alone Doesn’t Finish the Job

Removing the malware without also rotating credentials and patching the actual entry point (both covered in the breach recovery guide) leaves the door the attacker used still open. Reinfection after a technically successful cleanup is usually a sign one of those two steps was skipped, not that the cleanup itself was wrong.

8. Verifying the Site Is Actually Clean

“I removed everything I found” and “the site is clean” are different claims. Before declaring victory:

  • Re-scan with a different tool than the one you cleaned with — don’t trust the same tool to confirm its own work
  • Check Google Search Console’s Security Issues report again — a clean result days after cleanup is a stronger signal than an immediate re-check, since some detections take time to update
  • Check Safe Browsing and VirusTotal status again a few days later, not just immediately — blocklist status doesn’t always clear the instant the cause is gone
  • Monitor for a period afterward — one to two weeks watching resource usage, new file changes, and scan results is a reasonable window to catch a missed backdoor
  • Only then request Google’s security review if you were flagged — the breach recovery guide’s Section 8 covers that process; submitting before you’re confident risks a rejected review and a longer wait

9. When to Call a Professional vs. DIY

Professional malware removal services (Sucuri’s cleanup service, MalCare’s paid removal tiers, and similar providers like Astra Security) generally go beyond the free and DIY tools here: server-side scanning across the whole account rather than just the CMS, human review before removal, and often a stated guarantee or unlimited-cleanup commitment if the infection returns within a defined window. Exact guarantees, response times, and pricing vary by provider and change over time, so confirm current terms directly rather than relying on a secondhand summary.

DIY with the tools in this guide is reasonable when the infection is a single, well-identified issue (one flagged file, one injected snippet), you’re comfortable with SSH/file-manager access and can tell legitimate code from injected code, and downtime while you work isn’t critically costly.

A professional service is usually the better call when you’re not confident you’ve found every backdoor (especially after a prior cleanup didn’t hold), the site is business-critical and a second incident would be expensive, or the infection is spread across many files beyond what you’re comfortable investigating yourself.

10. Reinfection Prevention Checklist

The breach recovery guide’s prevention section covers the fundamentals — updates, strong passwords and 2FA, backups, a firewall, removing unused plugins. These are additional, scanning-and-hardening-specific habits worth layering on top:

  • Schedule recurring automated scans (weekly at minimum), not just when something looks wrong
  • Disable PHP execution in your uploads directory — see our .htaccess file guide, since it closes off one of the most common places backdoors hide
  • Set a recurring reminder to check Search Console’s Security Issues report, not just after an incident
  • Keep a known-clean file inventory or checksum baseline for core files so future comparisons are fast
  • Layer a web application firewall in as ongoing protection, not just a post-incident response — see our WAF guide
  • Pair scanning with uptime and integrity monitoring so a spike or defacement is caught in hours, not weeks — see our monitoring guide
  • Keep a recent, verified-clean backup on hand so a bad scan result isn’t your only option — see our backup and restore guide

11. Frequently Asked Questions

What’s the fastest way to check if my site has malware right now?

Run your domain through Google Safe Browsing’s site status checker at transparencyreport.google.com/safe-browsing/search and a free remote scan like Sucuri SiteCheck or VirusTotal. Both take under a minute, though a clean result from remote scanners alone doesn’t fully rule out a well-hidden backdoor.

Is a free security plugin scanner good enough, or do I need a paid tool?

Free tiers of Wordfence, Sucuri’s SiteCheck, and similar tools are genuinely useful for detection and a reasonable first line of defense. Several (MalCare among them) explicitly limit removal to paid plans — the free tier tells you something’s wrong but won’t clean it. Whether that matters depends on whether you’re comfortable doing the manual removal in Section 7 yourself.

Why did my scanner say the site is clean when I’m still seeing symptoms?

Signature-based scanners can miss custom or heavily obfuscated malware, and remote scanners specifically can miss server-side backdoors since they only see what’s publicly rendered. Run a second tool with actual server-side/file-level access, like a plugin scan or ClamAV, before concluding the symptoms have another cause.

Can I use ClamAV on shared hosting, or do I need a VPS?

ClamAV requires the kind of server access (SSH, or a host-provided scanning interface) that’s typically only available on a VPS or dedicated server, not standard shared hosting. On shared hosting, your host’s bundled scanner (often Imunify360/ImunifyAV) or a CMS security plugin are the realistic equivalents.

I found and removed a malicious file. Am I done?

Not necessarily. One malicious file is rarely the whole story — check Section 6 for the other types that commonly travel together (a backdoor is often how the file you found got there in the first place), then re-scan with a different tool per Section 8 before considering it resolved.

What is a webshell, and how do I know if I have one?

A webshell is a script an attacker plants to give themselves ongoing remote access, independent of the original vulnerability they used to get in — the mechanism behind most “I cleaned it and got hacked again a week later” situations. They’re typically disguised with filenames resembling core files and hidden in uploads directories or theme folders. The checksum verification and grep searches in Section 5, plus checking anything with an unexplained recent modification date, are the main ways to find one.

Do I need to change my passwords if I only found and removed malware, with no other signs of a breach?

Yes — malware getting onto your site generally means something let it in, and you can’t be certain credentials weren’t exposed in the process. Full credential rotation is covered in the breach recovery guide’s Step 5, and it applies whether the compromise was discovered via a dramatic defacement or a quiet SEO spam injection.

How long should I monitor the site after cleanup before I’m confident it’s really over?

There’s no universal fixed number, but one to two weeks of active monitoring — watching resource usage, new file changes, and repeat scans — is a reasonable window, since a missed backdoor typically resurfaces with new activity well within that timeframe rather than staying dormant indefinitely.


Find It, Confirm It,
Remove It Completely.

Malware removal fails for the same reason incident response fails: skipping ahead. Scanning with one tool and trusting it completely, removing the obvious file and stopping there, or declaring victory without a second scan are exactly how sites end up reinfected within days of a “successful” cleanup.

Detection and removal are only one piece of the picture. Once the site is confirmed clean, the credential rotation, entry-point patching, and Google review process are what actually close the incident out.

Scan twice.
Trust the second one.