Scanning for malware and cleaning up a hacked site Print

  • malware, hacked, security, cpguard, cleanup
  • 0

Signs your site has been hacked and the order to fix it in. The usual signs are redirects to odd websites, pages you did not write, Google warnings, spam sent from your domain, or files you do not recognise.

Scan the account

  1. In cPanel open cPGuard.
  2. The Dashboard shows threats stopped in the last 30 days. Open Manual Scan to scan your account, then read the result in Scanner Logs. The CMS threats page lists problems found in WordPress and similar installs.

A scanner finds known patterns. A clean result is useful but is not a guarantee.

Clean up in this order

  1. Change passwords for cPanel, FTP, databases, email and every WordPress admin (Securing your account with strong passwords and two-factor authentication). Do it first, or the attacker walks straight back in.
  2. Remove unknown admin users in WordPress under Users.
  3. Replace the software. Reinstall WordPress core files from a fresh download, and reinstall plugins and themes from their official source. Delete any you no longer use.
  4. Look for stray files. In File Manager sort by Last Modified. Be suspicious of PHP files inside wp-content/uploads and of recently changed files you did not touch.
  5. Check .htaccess (Showing hidden files and .htaccess in cPanel) and wp-config.php for lines you did not add.
  6. Consider a restore. If you have a clean backup from before the problem started, restoring it is often quicker and safer (Backups and how to restore your files). Update everything straight after.
  7. Scan again and watch for a few days.

If it doesn't work

  • The infection keeps coming back: there is still a backdoor, or an old plugin is still vulnerable. Remove or update everything and change passwords again.
  • Your site was suspended: reply on the ticket about it once you have cleaned up, and say what you did.
  • You want a second pair of eyes: open a ticket (Opening a support ticket that gets answered quickly) with the domain and the scanner log.

See Keeping WordPress safe to stop it happening again.


Was this answer helpful?

« Back