WordPress Security ServicesMalware Removal
Free Tool

wptriage: A Free WordPress Malware Scanner You Run From the Command Line

wptriage is the free, open-source scanner I wrote for the first hour of a hacked-site investigation. It isn't a plugin: you run it on the server, it reads your files and database without changing anything, and it tells you what doesn't belong. Here's how to get it, run it, and read the result.

Sergey By Sergey, WordPress security specialist Updated 3 min read
In this guide
  1. Where to get it
  2. What it checks
  3. What you need
  4. How to run it
  5. How to read the report
  6. Useful options
  7. No SSH access?
  8. Its limits

Where to get it

wptriage lives on GitHub: github.com/wpmalware-removal/wordpress-malware-triage-scanner. The README there has the full list of checks and options. For the story behind it and a sample report, see my blog post about wptriage.

What it checks

  • Files against the official releases: WordPress core, WordPress.org plugins, and WordPress.org themes. Files proven identical are cleared, so you only review what’s different.
  • Code nobody can vouch for: PHP in uploads, must-use plugins, drop-ins, hidden files, and PHP disguised as images.
  • Server settings: .htaccess rules that run images as PHP, and code added to wp-config.php.
  • What code does: backdoors, auto-login files, cloaking, and plugins that hide themselves.
  • The database: unknown administrators, injected options, rogue cron jobs, and scripts stored in posts.

What you need

  • SSH access to the server (or a copy of the site on your own computer, see below).
  • PHP 7.4 or newer on the command line. The mysqli extension is needed for the database check, and curl for downloading the official checksums. Most hosts have both.

How to run it

1. Download it, outside your website folder:

cd ~
git clone https://github.com/wpmalware-removal/wordpress-malware-triage-scanner.git

2. Scan your site. Point it at your WordPress folder, the one that contains wp-admin and wp-includes:

php wordpress-malware-triage-scanner/bin/wptriage scan ~/public_html

3. Save the report if you want to keep it or send it to someone:

php wordpress-malware-triage-scanner/bin/wptriage scan ~/public_html --output=$HOME/wptriage-report.txt

The scan reads database details from wp-config.php by itself. Most sites take under a minute. It never writes inside your website folder.

How to read the report

Findings are grouped by severity, each with the file (or database row), the reason, and the line of code that triggered it.

Severity What it usually means
Critical Almost certainly malicious, such as a backdoor or an auto-login file. Act on it.
High Very suspicious, such as a modified core file or PHP inside an image. Check it.
Medium Needs a human look. Often legitimate, such as a must-use plugin you installed.
Low / Info Context, not a problem on its own.

The last lines matter most:

  • Coverage shows how many files were checked and how many were proven identical to the official releases.
  • Verdict sums it up, for example “strong signs of compromise” or “review needed”.
  • If a part of the scan couldn’t run, such as the database check, the report says the scan is incomplete rather than calling the site clean.

Useful options

Option What it does
--since=2026-11-01 Lists unverified code changed on or after that date
--format=json Machine-readable output, for scripts and monitoring
--no-db Skips the database check
--offline Uses cached reference data only, with no downloads

To also see which installed plugins have known vulnerabilities (the likely way in), get a free Wordfence Intelligence API key and set it before scanning: export WORDFENCE_API_KEY=your_key. The vulnerability list is downloaded and checked on your server, so nothing about your site is sent anywhere.

No SSH access?

Download your site’s files and a database export from your hosting panel, set the copy up on your own computer with PHP and MySQL, and scan the copy. Scanning a copy is also the safest option if you’d rather not run anything on a live server.

Its limits

  • Premium and custom plugins have no public original to compare with, so they’re only checked by behavior.
  • A scanner that reads files can’t catch everything. A determined attacker can write code that slips past.
  • “Nothing found” means nothing it recognizes, not a guaranteed clean site. If you still see symptoms, trust the symptoms.

Found something? Don’t start deleting files straight away. Back up the infected site first, then follow my step-by-step cleanup guide. If it’s a store, your host has suspended the site, or the malware has already come back once, I can clean it for you.

Found a false alarm, or malware it missed? Please open an issue on GitHub. Reports from real sites are what make it better.

Sergey, WordPress Security Specialist
About the author
Sergey, WordPress Security Specialist

10 years in WordPress security and incident investigation, and more than 200 websites cleaned of malware. Top Rated on Upwork with a 100% Job Success score. More about me

Frequently Asked Questions

Is wptriage really free?

Yes. It's open source under the GPL (version 2 or later), with no paid version and no account. You can use it on your own sites and on client sites.

Can it damage my site?

No. It never loads WordPress or runs code from the site, and it never changes, moves or deletes files. The database connection is read-only.

Does it remove the malware it finds?

No. It only reports. For removal, follow my step-by-step cleanup guide, or have me clean the site.

Need a hand?

Let me clean your WordPress site for you

Send me your site URL and what you're seeing. I'll reply with what I think is going on and the next step.

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

Get My Site Cleaned →