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?
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 Oct 28 '15 at 9:28