Skip to content
General

How to Scan Your Website for Malware (and What to Do Next)

Check how Google sees your site, scan the files on your server and look for warning signs yourself. Then, if you find malware, clean it and close the way in.

By Tremhost Experts Updated November 5, 2026 5 min read

To scan your website for malware, combine three checks: an outside-in check of how Google and blacklists see your site, a server-side scan of your files and database, and a review of signs such as unknown admin users or files you did not upload. Outside scans only see what a visitor sees, so a server-side scan through your hosting control panel or a security plugin is the most thorough. If a scan finds malware, do not just delete files; find how the attacker got in and close it.

Signs your website may already be infected

Malware is often hidden from logged-in site owners, so take reports from customers seriously. Common signs:

  • Google or the browser shows a “Dangerous site” or “Deceptive site ahead” warning.
  • Search results show pages you never wrote, often about gambling, pharmacy or loans.
  • Visitors on phones are redirected to another site.
  • Your host suspends the account, or your email starts bouncing or being flagged as spam.
  • New administrator accounts, unfamiliar files or a defaced home page appear.
  • The site becomes unusually slow or uses far more server resources than normal.

Step 1: Check how the outside world sees your site

Google Search Console

If your site is verified in Google Search Console, open the Security issues report. Google lists detected problems such as hacked content, malware and deceptive pages, with example URLs. It is also where you request a review once the site is clean.

Google Safe Browsing site status

Google’s Safe Browsing site status page tells you whether Google currently considers your domain unsafe. Many browsers use Safe Browsing data to show warnings.

Online URL scanners and blacklist checkers

Free online scanners fetch your public pages and look for known malicious code, suspicious redirects and blacklist listings. They are quick and need no access to your server, but they cannot see files that are not linked publicly, such as hidden backdoors. Treat a clean result as a good sign, not proof.

Step 2: Scan the files on your server

This is the most important step, because most malware lives in files and the database, not on the visible page.

Use your hosting’s malware scanner

Many hosts run server-level scanners. On cPanel servers with Imunify360, you can open Imunify360 from cPanel to see files flagged as malicious and, depending on the host’s settings, clean or quarantine them. All Tremhost web hosting plans include Imunify360 with malware scanning.

Use a security plugin

If your site runs WordPress, Joomla or Drupal, a reputable security plugin can scan core files, themes and plugins and compare them with known clean versions. Install it from the official plugin directory, run a full scan and schedule regular scans.

Check core file integrity

For WordPress, compare your core files with the official versions. If you have command-line access, the WP-CLI command “wp core verify-checksums” reports modified core files. Any core file that has changed is suspicious.

Step 3: Look for common warning signs yourself

If you are comfortable in cPanel File Manager or over SFTP, check:

  • Recently modified files. Sort by date and look for changes you did not make.
  • PHP files in upload folders. In WordPress, wp-content/uploads should normally contain media, not .php files.
  • Obfuscated code. Long strings of random characters, often with functions such as base64_decode, eval or gzinflate. These have legitimate uses too, so check carefully before deleting.
  • .htaccess changes that redirect visitors elsewhere.
  • Unknown users in WordPress, cPanel, FTP and the database.
  • Injected content in the database, such as hidden links or script tags in posts and options.

Download a copy of anything before you change it.

Step 4: If you find malware

  1. Do not delete the whole site or restore a random backup. You may restore the infection and lose evidence of how the attacker got in.
  2. Download a copy of the site as it is, files and database.
  3. Change passwords from a clean device: hosting and cPanel first, then WordPress admins, FTP, database and email.
  4. Remove the malicious code, rogue users and backdoors.
  5. Close the entry point. This is often an outdated plugin or theme, a weak password or a nulled premium plugin. Update everything and remove what you do not use.
  6. Request a review in Google Search Console and with any blacklist that flagged you.
  7. Put a firewall in front of the site to block the same attack.

If you would rather have experts handle it, Tremhost Armor SOS gives a free same-day triage of hacked sites on any host, Monday to Friday, 08:00 to 17:00 CAT. You get a written finding and a cleanup quote before any paid work starts.

How often to scan

  • Run automated scans at least daily on business sites, which most server-level scanners and security plugins can do.
  • Check Google Search Console’s Security issues report regularly, and make sure its email alerts go to an inbox someone reads.
  • Scan after installing new plugins or themes, and after any suspicious behaviour.

How to reduce the chance of infection

  • Keep your CMS, themes and plugins updated, and delete ones you do not use.
  • Use strong, unique passwords and two-factor authentication.
  • Never install nulled themes or plugins.
  • Keep daily backups stored away from the site.
  • Use a web application firewall. Tremhost Armor Guard puts Cloudflare Pro, configured and monitored by Tremhost, in front of your site.

Tremhost managed WordPress hosting includes malware scanning and removal, daily backups and updates tested on staging.

Frequently asked questions

Can an online scanner tell me my site is clean?

Only partly. Online scanners see public pages. Malware hidden in files or the database, or shown only to some visitors, can be missed. Use a server-side scan as well.

Why does my site look fine to me when customers say it redirects?

Some malware only redirects visitors from search engines or on mobile, and hides from logged-in administrators. Test from a phone on mobile data, in a private window.

Will restoring a backup remove malware?

Only if the backup is from before the infection, and only if you also close the way in. Otherwise the attacker can reinfect the site.

How long does it take for a Google warning to be removed?

After you clean the site and request a review in Search Console, Google reviews it. Timing varies, so clean thoroughly before you request the review.

Next step

If your site shows signs of infection now, send your domain to Armor SOS for a free same-day triage.

Ask us on WhatsApp