If you’re seeing The site ahead contains harmful programs Error on your WordPress website, chances are that your site has been hacked or infiltrated with malware. The worst part: even if you locate and fix the hack, sometimes the red screen keeps popping up. This is because Google flags such websites to protect website visitors. But before you start pulling out your hair in misery, read on this WordPress tutorial and we will show you how to fix the infamous The site ahead contains harmful programs error on any WordPress site.
Table of Contents
Why do you get The site ahead contains harmful programs Error?
Before we get into the nitty-gritty of solving the issue, it’s important to understand the root cause of it. First and foremost, you need to know that there are a few other variants of this error:
- Deceptive site ahead
- This site has been marked as a phishing site
- The site ahead contains malware.
In the majority of the cases, getting these errors is due to the website being hacked. The hack itself might range from being a simple infection to highly sophisticated and hazardous. Also, it tends to introduce a virus on the website, which can spread to the client’s system if they visit this website.
Google pays special attention to such sites, flagging them as suspicious and unsafe. Besides hacked websites, Google also flags sites that are suspected of containing malware or attempting phishing.
Another reason that you might be experiencing the error is low-quality ads from dubious sources. These ads might contain harmful code or may link to pages that can infect the client’s system. Google gives you the option to analyze your site for locating bad code or viruses in a safe environment, through this following link.
Simply replace hostinger.com with the URL of your website to use this tool.
Fixing WordPress The site ahead contains harmful programs error
Now that we know the cause of the error, let’s move on to fixing it for good. Generally speaking, it is always a good practice to back-up your WordPress website when attempting such procedures, in case something goes haywire. A detailed guide on how to back-up your WordPress site can be found here. Once you’ve created a back-up, you can start working on the error.
As stated earlier, this error is caused by a security breach on your website. This is why often times, even upon removal of the malware, it keeps recurring. That is typically due to the hacker’s having discovered what is commonly known as a backdoor to your website. In network security, a backdoor refers to a security vulnerability, that hackers can exploit to circumvent the site’s security. It can take the form of a stolen password, having bad file permissions and other vulnerabilities.
For starters, you need to find this backdoor, and remove it as quickly as possible. After you’ve made sure that your site is secure once again, you need to erase any trace of the malware that might still reside on your site. We will see two methods for achieving this in the following sections.
Step 1 – Finding The Cause
Option 1 – Using Sucuri to Scan WordPress
As removing malware or any other viruses from your WordPress site could be a tiresome, and often frustrating endeavour, it’s recommended to use professional tools. One such option is Sucuri, which is an all-in-one website security service. You can use its free scanner to find malware / infected files on your website. Let’s take an infected website as an example and use Sucuri scanner to find out which files are infected.
From Sucuri report we can see that the test website has been infected with malware. We can also see infected files and even malicious script.
Now we have a few choices:
- Restore the not infected version of the site from a backup. On Hostinger control panel, backups can found under Files section.
- Manually delete malware/infected files. However, this will solve the issue temporary and it’s not a recommended method.
Option 2 – Using Wordfence
Another option to fix The site ahead contains harmful programs Error screen is to use a WordPress plugin. A number of plugins are available, but our favorite is Wordfence. It has the ability to scan your website for any harmful files and even replace infected files with clean ones. To use Wordfence, install and activate the plugin. the Once installation is completed, select Scan to search for infected files on your site. For a step-by-step guide, visit our tutorial on how to remove malware using Wordfence from your WordPress website.
Step 2 – Submitting Website for Reconsideration
The only thing left now is to ask Google to perform a review of your website. You can do this by adding your site to Google’s Webmaster tools:
- First of all, visit Google Search Console and sign in with your Google account. Once you are in, enter your site address and press Add a Property button.
- Google will ask you to verify ownership of your website. Download HTML file to your computer.
- Now upload the file to your hosting account. The file should be uploaded to the root website directory (in most cases it’s public_html). On Hostinger, you can do this using File Manager.
- Now head back to Google Search Console and press Verify button. You should see success message.
Upon adding the site, you will be able to review the security of your site and subsequently request Google to review it in Security Issues section. After the review process is complete, your website should finally get rid of The site ahead contains harmful programs Error.
In this tutorial, we saw how to fix The site ahead contains harmful programs Error for WordPress websites. Some common causes of the error were discussed, followed by two methods of removing the error:
- Using a security service like Sucuri to find infected files and manually delete files or restore a backup.
- Using a WordPress plugin like Wordfence
By following these steps, you will be able to permanently squash this irritating error, and restore your WordPress site to its former state. For more useful guides be sure to visit our WordPress tutorials section.