How to Install ClamAV on cPanel
To install ClamAV on cPanel, open WHM » Home » cPanel » Manage Plugins as root and click Install next to ClamAV, then choose scan areas in Configure ClamAV Scanner. cPanel recommends at least 3 GB of RAM. Its binaries live in /usr/local/cpanel/3rdparty/bin/, and accounts scan from the Virus Scanner icon.
For VPS and dedicated server owners running cPanel & WHM who want file and mail scanning without paying for a commercial scanner.
knowledge
- Read time
- 4 min
- Sections
- 7
- Updated
- 14 Nov 2026
- Written by
- WebJi® team
Last editorial update: 14 November 2026.
What does the ClamAV plugin add to cPanel?
The cPanel ClamAV plugin installs the Clam AntiVirus engine, its signature database and a scanning interface on a server you control. Root gets a Configure ClamAV Scanner page in WHM, and each cPanel account can get a Virus Scanner icon for its own files.
This is a server-owner job. On shared hosting the provider decides which scanner runs, and an account holder cannot add the plugin. You need root WHM on a cPanel VPS or dedicated server, and cPanel strongly recommends at least 3 GB of RAM, because the ClamAV daemon keeps its whole signature set in memory.
- Scans home directories, mail, public FTP space and public web space, on demand or from cron.
- Scans inbound mail through Exim automatically; outbound scanning needs two extra Exim settings.
- Signature-based detection, updated by freshclam.
- No licence fee; the plugin is offered in WHM’s Manage Plugins list.
cPanel’s own documentation now recommends ImunifyAV ahead of ClamAV. ClamAV still makes sense when you want an open-source scanner, mail scanning in Exim, or command-line scans you can script.
How to install ClamAV from WHM Manage Plugins
Install ClamAV in WHM » Home » cPanel » Manage Plugins by clicking Install next to the ClamAV entry, then wait for the success message in the progress window. Uninstalling uses the same row.
- Log in to WHM as root on port 2087. Resellers see Manage Plugins only if the provider grants that privilege.
- Type
pluginsin the WHM search box, or open Home » cPanel » Manage Plugins. - Find ClamAV for cPanel and click Install.
- Leave the progress window open until it reports success; packages and the first signature download run in this step.
- Open WHM » Plugins » Configure ClamAV Scanner and tick what to scan: Entire Home Directory, Mail, Public FTP Space or Public Web Space. Click Save.
Per-account overrides live under User Configuration on the same page: add users to Configured Users, then set which areas are scanned for each.
How do you confirm ClamAV is installed and its signatures are current?
Run cPanel’s clamscan with --version: it prints the engine version, the signature database number and the database date, which should be no more than a day or two old. The install can succeed while the first signature download fails, so check the date rather than the status.
/usr/local/cpanel/3rdparty/bin/clamscan --version
/usr/local/cpanel/3rdparty/bin/freshclam # update now and read any error
/scripts/restartsrv_clamd # restart the daemon after a manual updatecPanel’s ClamAV binaries live in /usr/local/cpanel/3rdparty/bin/, not in /usr/bin, so a bare clamscan may return “command not found”. If your own scripts expect /usr/local/bin, cPanel documents creating symlinks:
ln -s /usr/local/cpanel/3rdparty/bin/clamscan /usr/local/bin/clamscan
ln -s /usr/local/cpanel/3rdparty/bin/freshclam /usr/local/bin/freshclamFinally, log in to any cPanel account and look under Advanced for Virus Scanner. If the icon is missing, enable the feature for that account’s package in WHM » Feature Manager.
How to run a ClamAV scan from cPanel and from SSH
For one site, use the Virus Scanner icon in cPanel; for a server sweep, run clamscan or clamdscan as root from SSH in an off-peak window. clamdscan hands files to the running daemon, so it avoids reloading signatures for every run.
- One account, in cPanel: open Advanced » Virus Scanner, choose Scan Public Web Space or Scan Entire Home Directory, start the scan and read the report.
- One account, over SSH:
/usr/local/cpanel/3rdparty/bin/clamdscan --infected --multiscan --fdpass /home/USER/public_html. clamdscan always recurses into directories;--fdpasslets the daemon read files it does not own. - Every account, from root cron: cPanel’s documented loop scans each user’s home and appends hits to one file:
while read domain user; do /usr/local/cpanel/3rdparty/bin/clamscan -i -r /home/"$user" 2>&1; done </etc/trueuserdomains >>/root/infections.txtSchedule it daily during off-peak hours, as cPanel recommends, and prefix the command with nice -n 19 so web traffic keeps CPU priority. Cron syntax help is in the crontab examples guide. Read the output as a list of paths: a hit in an uploads or cache folder is often a malicious upload, but any hit in a PHP file is urgent.
How do you keep ClamAV signatures updating?
ClamAV only detects what its signatures know, so check weekly that freshclam is still updating and that the server can reach the update mirrors. A blocked outbound connection or a stale lock stops updates without any warning in cPanel.
- Run
/usr/local/cpanel/3rdparty/bin/freshclamby hand after install and read the output, not just the exit code. - Confirm outbound HTTPS (port 443) and DNS resolution work; signature mirrors are reached over HTTPS. If you run CSF firewall, check its outbound rules.
- If
clamscan --versionshows a database date older than three days, treat updates as failing. - Restart the daemon after a manual database repair with
/scripts/restartsrv_clamd.
Common ClamAV problems on cPanel and how to fix them
Five problems explain almost every ClamAV install that looks fine but scans nothing or slows the server.
| Symptom | Likely cause | Fix |
|---|---|---|
| No Virus Scanner icon in cPanel | Feature disabled for the package | WHM » Feature Manager: enable Virus Scanner for that package, then reload cPanel |
clamscan: command not found | Binaries are in cPanel’s 3rdparty tree | Use the full path or create the documented symlinks |
| Database date stuck | freshclam cannot reach mirrors, or a lock is held | Run freshclam by hand, read the error, allow HTTPS out |
| clamd stops or the server swaps | Too little RAM for the signature set | Meet the 3 GB RAM recommendation or move to ImunifyAV |
| Site slow during scans | Full scan at peak hours | Run the cron at night under nice -n 19, one account at a time |
What ClamAV on cPanel does not protect against
ClamAV flags files that match known signatures; it does not stop a new PHP backdoor being uploaded, block an exploited plugin, or clean an infected database. Treat it as one layer beside updates, a firewall and tested backups.
When a scan flags files on a live site, follow cleaning a hacked website before deleting anything, because removing one file rarely removes the way in. Pair the scanner with server backups you have restored at least once, and see what malware scanning covers for how signature and behaviour-based scanners differ. Email support@webji.services with the scan log if a hit names a file you do not recognise.
Sources: cPanel & WHM documentation, “Configure ClamAV Scanner” (docs.cpanel.net/whm/plugins/configure-clamav-scanner/) and “Manage Plugins” (docs.cpanel.net/whm/cpanel/manage-plugins/), both last modified 8 July 2026.
Frequently asked questions
Can I install ClamAV from cPanel instead of WHM?
No. Installation happens in root WHM under Manage Plugins. A cPanel account only gets the Virus Scanner icon after the server owner installs the plugin and enables the feature for that account’s package.
Should I choose ClamAV or ImunifyAV on cPanel?
cPanel recommends ImunifyAV for web malware, and ClamAV needs at least 3 GB of RAM to run comfortably. ClamAV remains useful for Exim mail scanning and scripted command-line scans. Many servers run ImunifyAV for websites and keep ClamAV only for mail.
Does ClamAV scan outgoing email from cPanel accounts?
Not by default. Inbound mail is scanned automatically. For outbound, open WHM » Exim Configuration Manager » Basic Editor » Security and turn on both “Scan messages for malware from authenticated senders” and “Scan outgoing messages for malware”.
Where are ClamAV’s settings on a cPanel server?
Daemon options such as LocalSocket, PidFile and ScanMail are in /usr/local/cpanel/3rdparty/etc/clamd.conf. Scan areas per server or per user are set in WHM » Plugins » Configure ClamAV Scanner rather than in that file.
Does ClamAV block malware before it runs?
Not for website uploads. It scans files on demand or on a schedule, so an infected file can sit on disk between scans. A firewall, correct file permissions and prompt updates prevent more attacks than the scanner does.
Last editorial update: 14 November 2026.
Ready to get started with WebJi®?
Join 12,000+ businesses across India and overseas. INR pricing, 18% GST shown before payment and 24/7 email support in Hindi and English — average first reply under 60 minutes.