One of my WordPress websites recently got hacked, and I had to download the full website to my local PC and clean it.

As soon as I downloaded the website, my antivirus software found the malicious code and quarantined it.

Is there any way that we can do the same on the live server cPanel? like a malicious file scanner?

  • 1
    I don't quite get what you're asking. Can someone put malicious code into your cpanel yes, more than likely since these are just files stored onto your server. Can you have a anti-virus software on your sever most likely, yes. But, I am guessing that you do your development on your machine (I hope you are).. Then you can do the anti-virus on your client before you upload it. You shouldn't have to do ANY server-side editing of any of the core files, then, you can have a catch where if editing is done then you can be alerted. I hope that this helps.
    – Phorce
    Commented Oct 28, 2015 at 9:28
  • Actually what I need is a malicious file scanner running on the server, that I can access anytime through cPanel or any other way, and that will scan all the files added to the server. I do the development on my local machine. But I found the above mentioned malicious code in the uploads folder, that means it is uploaded by a site visitor. I have already added limitations to file uploader to accept only image files. But it would be better if we can have a file scanner running all the time. Commented Oct 28, 2015 at 10:02

1 Answer 1


A little bit of googling(after on access scan clamav) came up with Clamuko, it seems to let you enable on access scanning of files.

The question that remains is if clamav would have caught the threat. Another option could be to look into Sophos' Linux scanner, it can also be configured for on-access scanning

Quick little sysadmin edit: I wouldn't suggest having on-access scanning on a busy site since on-access scanning will block the io operation. Regular full system scans where you email the result to yourself(and any other admins) and read them

  • Thanks for the suggestions. I got another doubt. Can I install any file scanner or any anti-malware program on a live server through cPanel by myself, or do I have to contact the server admin for installation and configuration? Commented Nov 17, 2015 at 9:21
  • I haven't used cpanel in over 4 years, this isn't really the best place to ask for that either, from vague memory clam is included with cpanel, but it doesn't have on-access scanning. To install/enable it you need access to WHM. Adding on-access to the bundled clam would be a bad idea since Cpanel tend to blindly make changes, so what you do might be lost.
    – Thor Erik
    Commented Nov 17, 2015 at 11:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .