Security and SSL

cPanel's Virus Scanner

Reviewed on 3 min read malware antivirus

Virus Scanner is the cPanel tool that uses the ClamAV antivirus to scan the files in your account on demand. Use it when you suspect there is malicious content, for example an infected attachment in a mailbox or a strange file on the website.

Run a scan

  1. Log in to cPanel and, in the Advanced section, open Virus Scanner.
  2. Choose what you want to scan:
    • Scan Mail: the account's mailboxes.
    • Scan Entire Home Directory: the whole account (website, email and the other folders). It is the most thorough and the slowest.
    • Scan Public Web Space: the public_html folder, where the websites are.
    • Scan Public FTP Space: the public_ftp folder.
  3. Click Scan Now.

Virus Scanner options in cPanel: mail, home directory, web space and public FTP

You will see the progress with the number of files and MB scanned. If the account is large it may take quite a while; the scan stops by itself if it lasts more than a day.

Scan progress and a virus-free result in Virus Scanner

When it finishes, if everything is fine, the message Virus Scan Complete. No Virus Found. appears.

If it finds infected files

The detected files appear under Infected Files, with their path. For each one you can choose:

  • Quarantine: moves it aside so that it is not used, without deleting it.
  • Destroy: deletes it.
  • Ignore: leaves it as it is.

Before deciding, look at the path:

  • An attachment in a mailbox (path inside mail/): delete it without worrying.
  • A file on your website that you do not recognise (a stray .php with an odd name, in wp-content/uploads or in the root): it is usually a backdoor left by an attacker. Quarantine it.
  • A file belonging to your application (for example wp-config.php, index.php or a plugin file): it has been modified with malicious code. If you destroy it, the website will stop working. Replace it with the original from the same version of the application or plugin.

If infected files appear on the website, someone has got in: cleaning the files is not enough, you have to close the way in. Follow the guide on what to do if your website or hosting has been hacked and, if it is a WordPress site, the one on cleaning WordPress after an attack.

If it finds nothing but the website still behaves oddly

ClamAV is designed mainly for viruses and email attachments, and it is less good at detecting PHP malware on websites. If your website redirects to other pages, users you did not create appear or spam is sent from the account, also check the Imunify360 scanner, which specialises in web malware and is also in your cPanel. We explain it in Imunify360.

You may also find useful

Something wrong or out of date? Tell us and we will review it.