You open your website one morning and Google is warning visitors away from it. Or a customer emails you: “Your site sent me to a casino page.” Your stomach drops — and then the panic question hits: how to remove malware from WordPress site without plugin tools, when you don’t even know where the infection is hiding?
Take a breath — you can clean a hacked WordPress site yourself with just your hosting control panel and a free online scanner. No SSH, no command line, no paid plugin.
Key takeaway: find every infected file, replace the dirty parts, lock every door the hacker used — and verify before you go live.
Signs Your WordPress Site Is Infected
Before you delete anything, confirm the infection. Malware rarely announces itself — watch for these red flags:
- Google or Chrome shows a “This site may be hacked” warning.
- Visitors get redirected to spam or adult sites — especially on mobile.
- New admin users appear that you never created.
- Your site runs slowly, or your host suspends you for sending spam.
- Unknown files appear in uploads, or your homepage shows content you didn’t write.
One match is enough — treat the site as infected until proven otherwise. For a deeper look, see our guide on how to check if your WordPress site is hacked.
Step 1: Back Up Everything BEFORE You Touch Anything
Never start cleaning before you back up. A backup is your undo button: delete the wrong file and you can restore it in minutes instead of rebuilding your site.
In cPanel, zip public_html in File Manager and export the database in phpMyAdmin, then store the backup on your own computer — not on the server you’re cleaning.
New to this? Our walkthrough on how to backup WordPress site without plugin takes ten minutes.
Step 2: Scan Your Site Free With Sucuri SiteCheck
Before hunting files by hand, get a map of the problem. Sucuri SiteCheck is a free online scanner — paste your URL and it reports known malware, blacklisting status, and injected code within a minute.
Note every flagged file and URL — that’s your cleanup checklist. Also note any blacklist warning and outdated software — an old version or plugin is often how the hacker got in.
Step 3: How to Find Malware in WordPress Files
Open cPanel File Manager and go hunting — malware usually hides in a few predictable places.
Check your uploads folder first. Your wp-content/uploads/ folder should hold only images and media — never .php files. Any .php file inside uploads is almost certainly malicious. Sort by file type and delete every one you find.
Sort files by “last modified” date. Check files changed around the time your problems started. Open suspicious files and search for malware fingerprints: long encoded strings, eval(, base64_decode, or shell_exec where they don’t belong.
Inspect wp-config.php and .htaccess. Open wp-config.php and look for code that doesn’t belong — injected scripts often hide at the very bottom. Then open .htaccess (show hidden files first) and look for redirect rules sending visitors to strange domains. If either file looks tampered with, replace it with a clean version.
Step 4: Replace WordPress Core for a Fast Clean Slate
The cleanest manual method is also the simplest: wp-admin and wp-includes hold only core WordPress files — none of your content lives there — so delete both folders and upload fresh copies.
- Download the latest WordPress from wordpress.org.
- Delete the
wp-adminandwp-includesfolders from your site. - Upload the fresh folders from the download.
- Replace the loose
.phpfiles in your site root with fresh copies — but do NOT overwritewp-config.php.
This one step wipes out a huge share of infections, since most malware lives in modified core files.
Step 5: Reinstall Themes and Plugins From Clean Sources
Themes and plugins are the other favorite hiding place — and the most common way hackers get in.
Delete each theme and plugin, then reinstall fresh from WordPress.org or the official vendor — never from a random download link. Delete anything you don’t use (inactive code can still be exploited), then update everything.
Key takeaway: if you can’t remember where a plugin came from, it doesn’t belong on your site — unofficial free plugins are the number-one infection vector for small sites.
Step 6: Clean Your Database With phpMyAdmin
Malware hides in your database too — rogue admin accounts, injected links, hidden scripts. Open phpMyAdmin from cPanel, select your WordPress database, and check:
wp_users: delete any admin you don’t recognize, then checkwp_usermetafor leftovers tied to that user ID.wp_options: searchsiteurl,home, and other options for unfamiliar URLs or encoded text.wp_posts: search for injected links or<script>tags you didn’t add, especially in older posts.
Step 7: Rotate ALL Passwords and Refresh Your Security Salts
Cleaning the files means nothing if the hacker still holds the keys. Assume every password is compromised: WordPress admin (and every user account), hosting/cPanel and FTP, your database password (then update it in wp-config.php), and your email password if your site sends mail from it.
Then refresh the eight security salts in wp-config.php. Salts are the secret keys behind login cookies — refreshing them logs out every user everywhere, including the hacker. Generate a fresh set at the official WordPress.org secret-key generator and paste the eight lines over the old ones.
Step 8: Purge Every Cache, Then Verify You’re Clean
Caches can keep serving infected pages after cleanup — purge them all: your caching plugin, your host’s server cache, and your CDN cache (Cloudflare, for example).
Run Sucuri SiteCheck again. A clean result is your first green light — but don’t stop there. Browse your site logged out and check on your phone too (mobile-only redirects are a classic trick).
Step 9: Harden Your Site So It Never Happens Again
Cleanup without hardening is just waiting for the next infection. Keep WordPress core, themes, and plugins updated (enable auto-updates for minor releases), use strong unique passwords with two-factor authentication, limit login attempts, remove unused themes and plugins, and keep regular backups — so the next incident costs you an hour, not a weekend.
Our pillar guide on how to secure WordPress site without plugin covers the full hardening checklist.
Manual vs Plugin vs Professional: Which Cleanup Is Right for You?
| Method | Cost | Time | Skill needed | Best for |
|---|---|---|---|---|
| Manual cleanup (this guide) | Free | 2–4 hours | Basic cPanel comfort | Small sites, patient beginners |
| Security plugin scan | $0–$99/year | 30–60 min | Low | Quick scans, ongoing monitoring |
| Hiring a professional | $100–$500+ | 1–2 days | None | Stores, big sites, repeat infections |
When to Pay a Professional Instead
Cleaning a hacked WordPress site yourself is realistic for most blogs and small sites — but not always the right call. Hire a professional if your site processes payments or stores customer data, if malware returns within days of cleaning (a backdoor is still hidden), if your host suspended your account, or if you don’t have 2–4 uninterrupted hours to do the job properly.
If you’re in over your head, see our services or contact us.
FAQ: WordPress Malware Removal Without a Plugin
How do I remove malware from WordPress without a plugin?
Back up, scan free with Sucuri SiteCheck, delete suspicious .php files from uploads, replace wp-admin and wp-includes with fresh core files, reinstall themes and plugins from clean sources, clean the database in phpMyAdmin, rotate passwords, refresh salts, and re-scan.
How do I know if my WordPress site has malware?
Google “site may be hacked” warnings, visitors redirected to spam sites, unknown admin users, sudden slowness, spam emails from your account, and unfamiliar files in uploads. A free Sucuri SiteCheck scan confirms it in about a minute.
Can I clean a hacked WordPress site myself?
Yes — most small sites can be cleaned manually with cPanel File Manager and phpMyAdmin in about 2–4 hours, no plugin or coding needed. If your site takes payments, stores customer data, or the malware keeps returning, hire a professional instead.
How much does WordPress malware removal cost?
Manual cleanup is free — just your time (about 2–4 hours). Security plugins with malware removal run $99–$299 per year; professional cleanup usually costs $100–$500+ depending on size and severity.
Final Word: Clean It Once, Lock It Forever
Learning how to remove malware from WordPress site without plugin tools pays for itself the first time you use it. The real win is what comes after: fresh salts, rotated passwords, and a backup routine that means the next attack costs you an afternoon, not your business. Clean it thoroughly, harden it properly, and never let a hacker back in through the same open door twice.