How to Fix “This site ahead contains harmful programs” Error in WordPress

The warning “This site ahead contains harmful programs” is an alert from Google indicating that your website may have been hacked or is hosting malware. This can happen due to a security vulnerability on your site, such as outdated WordPress core, plugins, or themes that have been exploited. Here’s how to fix this issue and get your WordPress site back to normal:

Scan Your Website for Malware

  • Use a Security Plugin: Install a security plugin like Wordfence, Sucuri Security, or MalCare on your WordPress site. These plugins can scan your site for malware and malicious code.
  • Manual Inspection: Check your website files via FTP for any recently modified files or unfamiliar files and folders. Hackers often leave backdoor scripts in directories that are rarely checked, such as wp-includes atau wp-content/uploads.

Remove the Malware

  • Clean Infected Files: If the security plugin identifies any malware or suspicious code, use the plugin’s features to remove or quarantine the infected files. For manual cleanup, delete any unrecognized files and clean up any malicious code from your files. Be cautious, as this might affect your site’s functionality if you accidentally remove or alter core files.
  • Remove Backdoors: Hackers often leave backdoor scripts to regain access even after the site is cleaned. Look for PHP files in non-PHP directories, files with base64 encode/decode functions, and files that are named similarly to WordPress core files but located in the wrong directories.

Check for Outdated Themes and Plugins

  • Update Everything: Outdated plugins and themes are common entry points for hackers. Update your WordPress core, all plugins, and themes to their latest versions.
  • Remove Unused Plugins and Themes: Delete any plugins and themes you are not using, as they can still be exploited by hackers.

Reset Passwords and User Permissions

  • Reset Passwords: Change passwords for all user accounts, especially administrators. Use strong, unique passwords.
  • Review User Accounts: Hackers may create hidden admin accounts to regain access. Go to Users in your WordPress dashboard and delete any unrecognized user accounts.

Check with Google Search Console

  • Use Google Search Console: Verify your site with Google Search Console (if you haven’t already) and check for security issues. Google will list any malware or security issues detected on your site.
  • Request a Review: After cleaning your site, use Google Search Console to request a review. Google will re-crawl your site. If it finds no issues, the warning message will be removed.

Implement Security Measures

To prevent future attacks, consider the following security enhancements:

  • Security Plugins: Keep the security plugin active and regularly scan your site.
  • Web Application Firewall (WAF): Use services like Cloudflare or Sucuri’s Website Firewall to protect your site from attacks.
  • Regular Backups: Ensure you have a system for regular, automatic backups of your site. Tools like UpdraftPlus or VaultPress can help.
  • Hardening WordPress: Follow WordPress hardening practices, like disabling file editing, protecting the wp-config.php file, and changing the database prefix.

Contact Your Hosting Provider

If you’re not comfortable handling the issue yourself or if the problem persists, contact your hosting provider. Many hosting providers offer malware removal services and can assist in securing your site.


The warning “This site ahead contains harmful programs” signifies a serious issue that can harm your visitors and damage your website’s reputation. Taking swift action to identify, remove the malware, and secure your site is crucial. After resolving the issue, focus on implementing security best practices to reduce the risk of future infections.