Websites and Tech

Malware Scan

Also called Security scan, site scan

A check of a site's files and database for injected or malicious code, run on the server, remotely, or both.

Quick facts: Malware Scan

Category
Websites and Tech
Also called
Security scan, site scan
Level
Intermediate
Affects
Rankings, browser warnings, email deliverability, visitor trust
Where to see it
WordPress security plugins, external site scanners, Search Console security issues report
In this article4
  1. How a malware scan works
  2. Why malware scanning matters
  3. Where malware scans go wrong
  4. How to act on it

How a malware scan works

A scanner looks for code that should not be there, and it does so in two ways. The first is comparison: your platform’s core files are published, so a scanner can check whether any of them differ from the official version, and an altered core file is a strong signal. The second is pattern matching against known malicious code — obfuscated blocks, functions that fetch and run remote instructions, hidden administrator accounts, spam links written into post content.

Where the scan runs matters. A scanner installed on the site can read every file and the database, but it is running inside the environment it is meant to be judging, so well-hidden code can hide from it too. A remote scanner fetches your pages the way a visitor does and looks for symptoms: injected links, unexpected redirects, or a warning already recorded against your domain. The two answer different questions, and a serious check uses both.

Why malware scanning matters

Most website infections are not designed to break your site. They are designed to use it quietly — to inject spam links about pharmaceuticals or gambling, to redirect visitors arriving from search while leaving the site normal for anyone typing the address directly, or to send email through your server. That is exactly why they go unnoticed: the owner visits the site, sees nothing wrong, and only discovers the problem when traffic collapses.

The consequences arrive from outside. Browsers show interstitial warnings once a site is flagged as unsafe, search engines can record a security issue against it, and email providers begin rejecting messages from a domain associated with spam. Recovering from that costs far more than the cleanup itself, because trust and rankings both have to be rebuilt.

Where malware scans go wrong

The most expensive mistake is cleaning the symptom and stopping. Deleting the injected code without finding how it arrived — an outdated plugin, a stolen password, a compromised shared hosting neighbour — guarantees it comes back, often within days, and each round makes the site messier.

The second is scanning a site that is already compromised and believing a clean result. Malicious code can exclude itself from a plugin’s scan or hide from an administrator while still serving spam to search engine crawlers. Checking what a crawler sees, rather than what your browser sees, catches infections a dashboard scan misses. A third mistake is restoring the most recent backup: if the infection is older than that backup, you have restored it too.

How to act on it

Scan on a schedule rather than after a scare, and pair a plugin scan with an external check and with Search Console’s security reports, which tell you what Google has recorded about the domain. If something is found, take the site offline or into maintenance mode before cleaning, so visitors are not exposed while you work.

Then treat cleaning as a sequence, not a single action: replace core, theme and plugin files with fresh copies from their official sources rather than editing them; remove unknown administrator accounts; change every password and any keys or salts; check scheduled tasks and uploaded files for stray scripts; and only then request a review from the platforms that flagged you. Close the entry point last but do not skip it, and keep website backups old enough to predate an infection. Where a site matters to the business, this belongs in a regular website maintenance routine.

Do and do not

Do

  • Scan on a schedule and check what crawlers see
  • Find and close the entry point, not just the code
  • Keep backups old enough to predate an infection

Do not

  • Trust a clean result from a plugin on an infected site
  • Restore the most recent backup without checking its date
  • Request a review before the site is genuinely clean

Questions people ask about this

My site looks fine. Why would I scan it?

Most infections are built to stay hidden. A common pattern shows the normal site to anyone typing the address, including you, while redirecting visitors arriving from search results or serving spam links only to crawlers. By the time the damage is visible, rankings have usually already fallen and browsers may be showing warnings. Scheduled scanning finds it earlier.

Can I just restore a backup to fix an infection?

Only if the backup predates the infection and the way in has been closed. Restoring a recent copy often restores the malicious code as well, and restoring a clean copy onto an unpatched site invites the same attack again. Restore from a known-good point, update everything, change all credentials, and only then bring the site back online.

How did my website get infected?

Usually through outdated software or weak credentials rather than a targeted attack. Automated scanners work through lists of sites testing for known weaknesses in popular plugins and themes, or attempt logins with common passwords. Abandoned plugins, nulled premium themes and reused administrator passwords account for a large share of the cases I see.

Related terms

Found this useful?

Share it, or ask an AI to summarise it

Back to the glossary

Knowing the term is the easy part

Applying it to your own site and budget is the work. Book a call and I will tell you what actually applies to you.