Fixing the error This site ahead contains harmful programs in WordPress

One of the errors that you may encounter on any site is that when you visit the desired address on that site, you will encounter the error message “This site ahead contains harmful programs” on a red page, which indicates that the site is infected. Or publish content that may contain malicious files on the site and be published on users’ systems. You can see an example of this error in the image below.

Fixing the error This site ahead contains harmful programs in WordPress

The error This site ahead contains harmful programs that will be displayed to you by Google, which prevents users from opening the desired page due to the site’s virality and the presence of malicious codes so as not to cause problems for visiting users. In this tutorial from Fa Host’s knowledge base, I will discuss how to fix This site that contains harmful programs error in WordPress.

Fixing the error This site ahead contains harmful programs in WordPress

But before I investigate and solve the problem, we must first see where this error comes from and find the place that caused the problem, and after we understand where the problem is, we should take action to fix it. Since this error occurs, usually such viruses can be transmitted; it is possible that when a site becomes viral from the side of the WordPress plugin or template, all other sites that use this template and viral plugin also become infected, and finally, the entire site and system. It overshadows users and endangers their security. Therefore, for this reason, Google specializes in security to prevent such problems.

How to know if our site has become viral or not?

Now that you are reading this article, maybe you want to check and see if your site is already viral or not. So, to check it, you can use the tool you have, which I will introduce below the tool provided by Google to check the site’s content.

Virus scan of the site with Google’s Transparency Report tool

One of the best tools for this task was designed by Google, by which you will be able to examine your site and measure all the pages of the site to see if there is a malicious file or virus on your site. For this purpose, first, go to the address and then enter your site address in the form of a complete URL with HTTP:// in the search box, similar to the image below, and then Click on the magnifying glass icon or press the Enter button and wait for your site to be checked.

Fixing the error This site ahead contains harmful programs in WordPress

Finally, if your site is a virus or contains malicious codes, the result will be displayed to you, otherwise, you will see a message with green content stating that the site is safe and does not contain malicious codes.

How to fix the This site ahead contains harmful programs error?

As I mentioned above, this error can originate from the WordPress theme and WordPress plugins that you use and cause this error from Google for your site. Now, to fix this error, you must first see which one of the files on the site that has become a virus or contains malicious code has caused this error. So, first, you need to search for the desired file; for this purpose, you can use the following methods.

Using scanners

Another tool that is available for you will be the use of a host. For this purpose, log in to your host and then click on the Virus Scanner to be redirected to the page for checking the files on the site to scan the site for viruses.

Fixing the error This site ahead contains harmful programs in WordPress

Then, on the opened page, select the Scan Public Web Space option so that all the files on your host are measured and evaluated, and finally, click on the Scan Now button to display the result of the scan to find malicious and virus files. .

Using the WP Authenticity Checker plugin

Using the WP Authenticity Checker, all the files in WordPress to examine and analyze Find a slow detection virus. For this, the first WordPress plugin installation tutorial installs and activates the desired.

After installing and activating the plugin, a menu similar to the image under the title WP Auth Checker will be added to the front of your WordPress site; click on it to be redirected to the plugin page to check whether the WordPress template files and WordPress plugins are malicious or not.

Fixing the error This site ahead contains harmful programs in WordPress

As you can see in the image above, this plugin has checked all WordPress template and plugin files and entered the result here in each of the files where malicious codes have been detected; now you can refer to the desired file and Check the line number of the code in the code file and see if this line causes an error or not!

Disable plugins and use the default theme

If you failed to identify the file that caused Google to identify your site as a virus by using the above two solutions, at this stage, first go to Display > Themes and then activate one of the default WordPress templates; after activating the template, Default WordPress, open the address of the page where the desired error was displayed to you and check by refreshing the page to see if the problem has been solved or not!

Otherwise, the problem is not with the template, and this time you should check your plugins. For this purpose, refer to the path of plugins in the WordPress counter, if you think that the desired error occurred after installing or updating a plugin that you just made on the site, disable it and check it again, but if the problem is not resolved. This time disable all site plugins and then activate each plugin one by one and refresh the address of the page where you encountered the This site ahead contains harmful programs error every time.

Review of WordPress widgets

Another part that can cause This site ahead contains harmful program errors in WordPress is the use of codes from other sites, which usually include advertising codes or special tools used in the WordPress widgets section. by going to View > Widgets, temporarily disable all the widgets that contain JavaScript codes, which are usually used to display advertising banners, Whether your problem has been solved or not.