How to Scan & Detect Malware in WordPress Theme (Updated 2021)

Updated on

Detect virus in wordpress theme

Scan WordPress Theme For Malicious Code

Need to find out if your WordPress theme is infected with a malware? Not sure if your nulled wordpress theme has a malware. It is not safe to install nulled wordpress theme as most of these are infected with virus or malicious code. It becomes mandatory you to scan your WordPress theme & plugins for malicious code and detect malware infection to prevent wordpress hacking.

Today a number of websites are providing free WordPress plugins and themes. But the main issue is that you can not trust sources other than official WordPress repository. Most of the people who provide free themes injects malicious code which is really hard to find. And, they do so with the intention to hack those WordPress websites in which such themes are installed.

Also Read – 

Let’s make sure that your WordPress Theme Is Free From Malware. In this blog, we will help you scan your WordPress theme for  malware or malicious code along-with best plugins you can use to scan your WordPress theme for potentially malicious code. After you have detected a malware in wordpress, you might also need to know . Before that you should be aware of wordpress vuln


What is A Nulled WordPress Theme?

Nulled means Cracked or Hacked Version of a WordPress Theme. Basically,its a Premium WordPress Theme which is available for free(illegally). These themes mostly come up with the backdoor hack for entering your website which loosens the and makes it prone to hacking and common malware infections like WordPress malware redirect.

Nulled WordPress Theme

🛑 Is Your WordPress Theme infected with Malware?

WordPress is featuring premium themes in its latest versions which are highly secure and malware insusceptible. Unfortunately when it comes to free themes, they are the most easily targeted preys for web attackers. The reason behind is that downloading a free theme from an unknown source or pirated websites may affect the security of your websites.

Such themes are poorly coded and lead to create unauthorized access to websites through loopholes. An unknown source of theme may be created by a hacker who tweaks it for their own profits. There are several reasons behind the exploitation of such themes.

Some of the common reasons are:

  • ​To get a back link from the blog posts on your websites
  • For redirecting your website to spam links
  • To add adverts.
  • To create a backdoor to your website

Don’t Know if your WP theme is infected with malware or not. Find out now.

Scan WordPress Theme For Malware

⭐ Signs​ To Look For Presence Of Malicious Code in WordPress Themes

detect malware wordpress theme

Before discussing the steps to How to Detect Malicious Code or Malware in WordPress Themes, let us hammer out the locations where the malicious code is generally inserted by the hackers. The two common locations on target of smart hackers are the footer.php file and the style.css file.

Apart from this, you should manually check all the files within the theme. The WordPress themes might include some basic files for its functioning. But, if you find additional files that are called without the .php function then your themes are injected with serious malware.

Signs that suspect your WordPress themes are infected with malicious content:

  1. Google Warning Messages (“This Site May Be Hacked”, Deceptive site ahead warning, Google Blacklist Warning message): Your website will be displayed with a malware warning message with either an entirely blocked website or partially blocked website.
  2. WordPress White Screen of Death: When your website suddenly starts showing white screen of death, it means that your site is probably exploited with malware infection.

Are you unaware about WordPress white screen of death? Read it in detail from here.

  1. .htaccess pirate: If your .htaccess file is corrupted, it keep redirecting your website to other spam links which you can’t understand.
  2. Popups: When there are several popup ads running on your website start redirecting towards malicious links or other popups if you tend to close, this means your website is a victim of malware exploitation.

🛑 How to detect Malicious code in nulled/free WordPress Themes?

You can follow these methods for checking Malware in WordPress Themes .First of all, Perform a Google search on the website you are getting the theme from, this is just a precautionary move.

Performing a Google search is a good way to check if there’s a malicious code in a particular WordPress theme. If someone out there has found a malicious code in a theme they got from the same location, such a person must have sounded out a warning to others.

Initial step in discovering hidden malware or malicious code in your WordPress theme is to check if the files contained in the theme are all required in WordPress theme.

💡 NOTE – If you are a developer, want to dive deep in and find out. Otto does a great job here, going in-depth and dissecting the theme to check for malware presence.

  • Scan WordPress Theme before Installation

The most frequent technique to detect malware on your installed themes is to scan your entire website. This will scan all the files on your website. You can do so in several ways:

  • Ask Google:

Google Safe Browsing is a tool that alerts the webmasters when their websites are compromised with unsafe content or malicious files.  You can use this tool to diagnose your website for surreptitious malware and resolve it.

Insert your website url in the above mentioned link and press ENTER. For example –

When you press ENTER, it will provide you the Safe Browsing status of the website with the unsafe content found on your website.

  • Search Files

Make a cross file search for eval. If you find this one then the author (or someone who ripped it) has something to hide. Read more about .

You can also use free malware scanners for scanning your website. A short overview of such scanners:

  • PCRisk: It is a free online tool that can be utilized to can any website for malicious codes, vulnerability exploits, infected files and other suspicious activities.
  • SiteGuarding.Com: Another popular online tool to check your website for malware and security issues.
  • After downloading the plugin or theme, The first thing you should do is to check for virus, trojans and other worms using Virus Total.Detecting Malicious codes
  • WP Hacked Help: A free online wordpress malware scanner tool. You can scan your website for potential malware with this tool. You can also use a security plugin such as Wordfence

 scan wordpress detect malware

wordpress malware scanner

⭐ WordPress Theme Checker Plugins To Detect Malicious Code

Sometimes people download free themes from anywhere other the author’s page. The themes installed this way are poorly coded which makes it easier for hackers to insert back links to their websites.

Another effective way to deal with malicious code disguised in your free WordPress themes is to install best security plugins for WordPress, that are designed for this purpose only.

So here are the most powerful WordPress plugins to check WordPress Theme for malware.

  • ​Theme Authenticity Checker (TAC)

 Scan Your WordPress Theme For Hidden Malicious code.

TAC scans the source files of all the WordPress themes installed on your website. It takes you to the particular theme, the line number and a small piece of the distrusted code​ where the suspected malware is found. You can analyze the code and hence, easily​ remove the malware. To download this plugin, click here.

  • WP Antivirus Site Protection​


This plugin regularly scans not only the WordPress themes but also all the other files uploaded on your WordPress website. The important feature is that it keeps the customers up-to-date with the site’s security issue by sending alerts and notifications via email​.

  • Quttera Web Malware Scanner​


This plugin is specialised in detecting hidden malware, viruses malicious codes, spam links, blacklisting status and much more. So, you can use this tool to scan your website for free by installing this plugin. Quttera​ offers different malware cleanup plans for websites. To check these plans, you can visit the website.

  • ​BulletProof Security plugin:

BulletProof Security is one of the best wordpress security plugins of 2020, it comes with a number of salient features for WordPress security protection. This plugin has MS Malware scanner to scan each and every file present on your WordPress website. It also offers .htaccess Security WordPress Protection (Firewalls). Other features are login security. database backups, anti-spam and regular monitoring of website for website protection.

  • Anti-Malware​:

Anti Malware is one of he popular plugins used to scan and detect malware from WordPress websites. Free version of WordPress offers detection of malware whereas you can also choose premium version for additional features. A premium Anti Malware plugin checks the WordPress site for brute-force attacks and DDos Attacks. You can get it here for free.


WordPress Theme Safety tips

⭐ Preventive Tips To Make Sure That WordPress Theme is Safe.