Skip to content

Malware scanner WordPress

A payload can sit in a PHP file in uploads, wait for a cron event or hide in an option that runs on the next request, while your pages look unchanged.

Malware Scanner add-on in BotBlocker Security

Malware scanner WordPress: what the page never shows

The scanner reads the server. Code that prints nothing leaves no trace in the HTML.

Why a changed page is a late warning

Most owners learn about an infection from a visitor, a Search Console message or a payment provider. By then the code has been running for weeks and the entry point is still open.

A web page shows the result. A redirect can live in an option, in a post, in a theme file or in a must-use plugin, and the HTML looks the same in all four cases.

A malware scanner WordPress owners can read has to check the places where code and data actually live: core files, plugins, themes, uploads and the database.

Five checks behind one report

Core against the original

WordPress core is compared with the official files of the same version. Changed, added and missing files are separate findings.

Plugins and themes

Official copies are compared where they exist, and every added file is read for known bad-code patterns.

Uploads and custom code

Files without an official copy are read directly. An image folder is a normal place to hide a PHP file.

The database

Posts, pages, options, users and cron hooks are checked for spam links, injected redirects and accounts that were never created by you.

Deep code analysis

When enabled, the scanner removes common obfuscation before it matches patterns, so disguised code does not pass as harmless.

Scheduled runs

A scan can start hourly, daily, weekly or every five days. It runs in the background, never on a page request.

How a scan is limited on a real server

The scanner stops at 100 000 files and 250 findings by default, checks database rows newest first and works through files in batches of 50. Those limits keep a scan inside the memory and time a shared host allows.

After an attack you raise the finding limit and scan again, because the first pass may stop before it reaches every affected file. On a slow host you lower the batch size and accept a longer run.

The scanner also skips folder names such as cache, backup, node_modules, vendor, .git and .svn. Code inside plugin vendor folders is not read.

Reading a finding without guessing

Every finding carries two independent values. Severity runs from low to critical and says how bad the pattern can be. Confidence says how sure the scanner is that this is really bad code.

A critical finding with high confidence is a decision for today. A critical pattern with review confidence is a question for a human, because a vendor patch or your own edit can look unusual.

The finding shows a short code extract with passwords and keys redacted by default. You can download a small sample and compare it with a fresh copy of the same plugin version before you delete anything.

The report is evidence. Replacing an infected file is a manual step, and the entry point has to be closed afterwards: updates, unused plugins removed, passwords rotated, security keys replaced.

One of hundreds of BotBlocker capabilities

This add-on covers one job. The core plugin brings the firewall, the visitor check, the login rules and the log, and PRO features extend them further. Install BotBlocker and turn on what your site needs.

BotBlocker protection shield

Questions about the scanner

Does a clean scan prove the site is clean?
No. It proves that the scanned places looked normal at that moment. Files outside the limits were not read, and a new payload can arrive after the run.
Will the scan slow down visitors?
No. Scans run in the background in batches. A page request never waits for a scan.
Why does the report show files from a plugin I trust?
A plugin update can carry code its author did not write. Compare the file with an official copy of the same version before you act.
The scan stops early on shared hosting. What now?
Lower the batch size and run it at a quiet hour. If it still stops, raise the file limit or scan fewer folders.
Scheduled scans never start. Why?
WordPress scheduled tasks need traffic. A site with almost no visitors needs a real cron job at the host, pointed at wp-cron.php.