How To Delete Malware From Your Website: A Digital Defensive Guide

January 6, 2021 in Malware

According to recent data, a whopping 17.6 million of the world’s websites are infected with malware. You may be wondering: How can you tell if you have malware? And once your site is infected, how can malware be removed?

Here, we’ll answer both questions—showing you how to delete malware from your site and defend your digital presence.

Signs Your Site May Be Infected

How can you tell if you have malware? While some attacks are obvious—like a defacement hack that destroys your site’s appearance—most malware hides in plain sight, running malicious processes in the background.

The most obvious sign of malware is a host suspending your account or Google blacklisting your site. In these cases, visitors will be met with a suspension page or a warning from Google.

But if Google or your host doesn’t catch the malware right away, you may still notice other signs of an infection. These can include:

  • Spam information in Google search results related to your website
  • Unwanted pop-ups, downloads, or a redirect to a malicious website
  • Unrecognized admin users added to your website’s CMS

None of these issues are desirable. However, they can be deterred.

How To Delete Malware From Your Site

Can malware be removed? The answer is yes (thankfully). But depending on your background, knowing exactly how to delete malware may be easier said than done.

Malware can infect your site files, database, or both—and removing it can be a highly technical process, often requiring specialized knowledge or help from a security partner. When bouncing back from an attack, you should have some experience modifying files and databases, as even the smallest mistake can take hours of work to undo.

Step 1: Back it up

Before attempting any cleaning or deleting, have a full backup available should you need to restore for any reason. If the infection happened recently enough, you may be able to simply restore from a pre-attack backup and undo the bulk of the damage. This doesn’t resolve the vulnerability that allowed malware into the site, but it can delete malware quickly.

Step 2: Investigate the issue

Connect to your files using your preferred method: FTP, SSH, or cPanel File Manager. If you’re in a shared hosting environment, your host is likely running a daily malware scan. When malware is flagged in these scans, the results are added to a file called “malware.txt” in your hosting root. This is invaluable, as it provides a path to each infected file. For dedicated or VPS users, an open-source antivirus engine like ClamAV will do the same thing.

Step 3: Carefully target the culprit

Malware is often added to legitimate and necessary files. In these cases, simply deleting the infected files can cause future site issues. If you’re using a CMS like WordPress, download a fresh copy for comparison. These CMSs contain “core files” which are the same from site to site, allowing you to compare your site’s file to a clean copy. Often, you can simply replace your file with a clean one to ensure it’s malware-free.

Top Tools For Malware Removal

While the process of manually cleaning or deleting malware can be involved, there are a host of helpful tools at your disposal. On top of that, you can proactively prevent infection with automated website scanning solutions and firewalls.

Still wondering how to delete malware from your site? Contact the SiteLock team today.

Latest Articles
Follow SiteLock