
Malware Scanning in WordPress: Tools and Process
Want to know how your own site is doing?
Learn how to detect and remove malicious code from WordPress before Google blacklists your site. Discover essential tools and a step-by-step cleanup guide.
Author: Kodulehehaldus
What is website malware?
Website malware = malicious code that:
- Redirects visitors to other sites
- Steals data (card details, passwords)
- Injects SEO spam (Viagra, Casino links)
- Uses the server for crypto mining
- Sends spam emails
How does malware get in?
The most common ways in are a weak password, an outdated plugin, an outdated WordPress core and poor hosting.
Signs of infection
Visual
- Strange ads appearing
- Users complaining "the page redirected me somewhere"
- Different content on mobile vs desktop
- Homepage has been defaced
Technical
- Search Console warning
- Antivirus blocks visitors
- Hosting provider sent an email ("incident notice")
- Sudden spike in server load
- File changes without your permission
SEO
- Brand search displays "this site may be hacked"
- Traffic dropped sharply
- Strange pages indexed (
/casino-online.html)
Scanning tools
Web scanners (quick)
- Sucuri SiteCheck – free, fast
- Google Safe Browsing – check if Google is blocking you
- Quttera – deeper analysis
- VirusTotal – 70+ scanners at once
WordPress plugins
- Wordfence – most popular, free + premium
- Sucuri Security – professional, free
- iThemes Security – comprehensive
- MalCare – cloud scanning
- WPScan (Jetpack) – official vulnerability database
Server-side
- ImunifyAV – often found in cPanel
- Maldet (Linux Malware Detect) – server level
- ClamAV – open-source
The scanning process
1. Initial scan
# Wordfence
wp wfconfig set 'highSensitivity' true
wp wf scan2. File comparison
Original WP files vs server files:
wp core verify-checksums
wp plugin verify-checksums --allAny mismatches are suspicious.
3. Database check
Search for:
wp_optionstable – strangesiteurlchangeswp_users– unknown administratorswp_posts– hidden posts (post_status = 'draft'with spam)
4. .htaccess check
Hackers often add redirects:
RewriteCond %{HTTP_USER_AGENT} (google|bing) [NC]
RewriteRule ^.*$ http://evil.com [R,L]5. Wp-config.php check
Look for:
- Eval calls
- Base64 encoded code
- Strange
definelines
Common hiding places
In files
/wp-content/uploads/– .php files in image folders/wp-content/cache/– hidden among cache fileswp-includes/– deep within the corefavicon_*.ico.php– disguised files
In code
- Base64 encoding:
eval(base64_decode("...")) - Obfuscation: long variable names, hex codes
- Backdoors:
<?php @system($_GET['cmd']); ?>
Removal process
See the detailed guide: Website hacked – what to do.
In short:
- Backup the current state (as evidence)
- Activate maintenance mode
- Run a full scan
- Remove malicious files
- Replace WP core with clean files
- Clean the database
- Change ALL passwords
- Activate 2FA (guide)
- Add a WAF
- Resubmit to Google
After cleaning
Search Console
- Security Issues → "Request a review"
- Usually takes 1–3 days
- Include a description of what you did in the request
Monitoring
30 days of supervision:
- Daily scanning
- File integrity monitoring
- Login attempt logs
- Server load monitoring
Prevention
- Regular maintenance – see WordPress updates
- Strong passwords + password manager
- 2FA for all admins
- Plugins only from official repositories
- Off-site backups
- Quality hosting
- WAF (Cloudflare, Sucuri)
Costs
| Service | Price |
|---|---|
| DIY cleaning | £0 (but risky) |
| Plugin (Wordfence Premium) | $119/year |
| Sucuri firewall + cleanup | $200/year |
| Professional one-time cleanup | £300–£1500 |
| Long-term management + monitoring | £50–£300/month |
Summary
Malware scanning should occur daily and automatically. Waiting just one day can lead to SEO consequences lasting months. Our management packages include daily scanning and immediate response. Request a quote.
Sources
Join the newsletter
Once a month, practical tips on making your website faster, more secure and easier to find on Google and in AI search.
Author
Kodulehehaldus.com (Innov8it OÜ) – an Estonian web agency that builds, maintains and optimises websites.