WordPress malware removal means finding every piece of malicious code on your site, deleting it, replacing damaged files with clean ones, closing the hole the attacker used, and checking that the site stays clean. Removing only the visible symptom is not enough, because hidden backdoors let the infection come back.

This guide complements our first-hour checklist in WordPress site hacked: how to fix it. That post covers the first hour. This one covers the full cleanup and what a professional service does.
The short version
- Signs include redirects, unknown admin users, spam pages, host suspension and browser or Google warnings.
- The process has six steps: scan, contain, clean, restore, harden, verify.
- You can handle a simple case yourself if you have a clean backup. Call a professional if you cannot find the entry point or the infection returns.
- After cleanup, change passwords and keys, update everything and, if Google flagged the site, request a review.
In this guide
Signs your site needs WordPress malware removal
Most infections show up as odd behaviour visitors see first or as warnings from Google, your host or antivirus tools. The WordPress.org guide “FAQ My site was hacked” calls these symptoms indicators of compromise.
The indicators it lists include:
- The site is blacklisted by Google, Bing or similar services.
- Your host has disabled the website.
- The site is flagged for distributing malware.
- Visitors say their antivirus flags your site.
- You are told your site is being used to attack other sites.
- Unauthorised behaviour, such as new users you did not create.
- You can see the hack when you open the site.
Other common signs we see in practice are visitors sent to unfamiliar sites, strange pages appearing in search results, and a sudden slowdown. None of these proves malware on its own, but each is a reason to run a scan.

The six steps of WordPress malware removal
A proper cleanup follows a fixed order: scan, contain, clean, restore, harden, verify. Skipping a step is the usual reason a site is hacked again a few days later.
- Scan. Find out what is infected and how far it goes.
- Contain. Stop further damage and lock out the attacker.
- Clean. Remove malicious files, code, users and database entries.
- Restore. Replace damaged core, theme and plugin files with clean copies.
- Harden. Close the hole and tighten settings.
- Verify. Re-scan, test the site and watch for reinfection.
The next sections walk through each step of WordPress malware removal.
Step 1 and 2: scan and contain
Start by taking a copy of the current state and writing down what you see, then scan with more than one tool. The WordPress.org guide asks you to note what you saw, when you noticed it and what you changed recently, and to take one more snapshot before cleaning, even if it is infected.
The same guide notes that no single scanner is the best approach, and that using application-level scanners (plugins) together with remote scanners improves your odds. It names plugin scanners such as Quttera, GOTMLS, Wordfence and Sucuri, and remote tools such as VirusTotal and Sitecheck. Treat scanner results as leads, not proof, since a scan can miss a backdoor or flag a harmless file.
To contain the problem, the guide suggests locking things down so no more changes happen: reset passwords for all users, especially administrators, and clear active sessions by replacing the secret keys in wp-config.php. It also suggests running a full antivirus scan on your own computer, because stolen login details can come from there. Ask your host whether other sites on the same account are affected.
Step 3 and 4: clean and restore
Cleaning means removing every malicious file, user and code snippet, and restoring means replacing damaged files with known-good copies. A clean backup from before the infection is the easiest route, but only if you are sure the backup itself is clean.
The WordPress.org guide gives these practical points:
- Reinstall the same WordPress version, not an older or newer one.
- Do not use the reinstall option in wp-admin. Replace files by SFTP, because the built-in installer often only overwrites existing files while hacks add new ones.
- The /wp-admin and /wp-includes folders can be replaced safely.
- Go through wp-content more carefully, since it holds your theme and plugin files.
- Check the .htaccess file, which is often changed in attacks.
- Watch files that affect every page, such as index.php, header.php and footer.php.
A professional also checks the database for injected content, removes unknown admin accounts and deletes plugins or themes that you no longer use. Pages that Google may already have indexed with spam need to be removed too. Our WordPress maintenance and support plans include this kind of cleanup for hacked sites.
Step 5 and 6: harden and verify
Hardening closes the gap that let the attacker in, and verification proves the site is clean. Both matter, because a cleaned site with the same weak plugin or password will be infected again.
The WordPress.org hardening documentation, as we read it in November 2026, covers measures such as:
- Keep WordPress, plugins and themes updated, and delete plugins you do not use.
- Use strong passwords, SFTP and two-step authentication.
- Keep file permissions restrictive. The page gives 755 for directories and 644 for files as general values.
- Restrict wp-config.php to 400 or 440.
- Add
DISALLOW_FILE_EDITin wp-config.php to remove the file editing capabilities from the dashboard. The page says this does not stop an attacker from uploading malicious files. - Keep backups, logging and file monitoring.
Read the full list in the WordPress hardening documentation, and our own WordPress security checklist turns it into a routine you can follow.
To verify, re-run your scanners, test the front end and the login, check that unknown users and files are gone, and watch the site for the following days. Reinfection usually means a backdoor was missed.
Find and remove backdoors
A backdoor is a hidden file or code snippet that lets the attacker return after you clean the visible malware. Most infections that come back do so because a backdoor was missed, not because the cleaning was wrong.
Backdoors hide in places you rarely look:
- PHP files inside wp-content/uploads. The uploads folder holds images and media, so it should never contain a PHP file. Any PHP file there is a backdoor until proven otherwise.
- Must-use plugins in wp-content/mu-plugins. These load on every request and do not show in the normal plugins list, so an attacker can hide one there.
- Drop-in plugins such as advanced-cache.php or object-cache.php in wp-content.
- A changed .htaccess file, or code added to index.php, header.php or footer.php.
- Code added to wp-config.php itself.
To find them, list files changed recently, search your files for code patterns attackers use (such as eval, base64_decode, gzinflate and str_rot13), and check the must-use and drop-in plugin lists. The WP-CLI commands below do this in a few lines. Delete a backdoor only after you have a backup, and re-scan after removing it, because one infection often plants more than one.
Clean the WordPress database
Malware hides in the database as well as in files. Replacing files alone leaves the infection in place if the database still holds injected code or rogue accounts.
Check these three tables first:
- wp_options: look for injected scripts or strange values in siteurl, blogname and the active plugins list.
- wp_posts: look for spam posts you did not publish, and for injected links or script tags inside post content.
- wp_users: look for admin accounts you did not create. Remove any user you cannot account for, and check the capabilities of the rest.
Search wp_posts and wp_options for <script, eval(, base64_ and iframe. The WP-CLI command wp db search does this across both tables at once. Back up the database before you delete anything, because a wrong delete can break the site. Our WordPress security checklist covers the routine that keeps the database clean after the cleanup.
WordPress malware removal with WP-CLI
If you have SSH access, WP-CLI finds most infections faster than clicking through the dashboard. Run these from the site root, and take a backup first.
Check core and plugin files against the official copies:
wp core verify-checksums wp core verify-checksums --include-root wp plugin verify-checksums --all
These commands compare your files with the checksums published by WordPress.org and report files that were changed or should not be there.
Find PHP files where they should not be:
find wp-content/uploads -type f -name '*.php'
The uploads folder should hold no PHP files at all. Any result here is a backdoor to investigate.
Search for suspicious code patterns:
grep -rlE 'eval\(base64_decode|eval\(gzinflate|gzinflate\(base64_decode|str_rot13\(' wp-content --include='*.php'This lists every PHP file that uses the code combinations attackers use to hide malware. Read each result before deleting anything, because a few legitimate plugins use similar functions.
List admin users and hidden plugins:
wp user list --role=administrator --fields=ID,user_login,user_email,user_registered wp plugin list --status=must-use wp plugin list --status=dropin
Any admin you do not recognise, and any must-use or drop-in plugin you did not install, needs investigating.
Search the database for injected scripts:
wp db search '<script' wp_posts wp_options --table_column_once
These commands find the infection. Removing it still takes care: replace changed files with clean copies, delete only what you have identified, then re-scan. If the infection returns after this, the entry point is still open, and that is the point to call a professional. See what a WordPress malware removal service should include before you hire one.
What you can do yourself and when to call a professional
You can often clean a small, recent infection yourself if you have a trusted clean backup and basic file access. Call a professional when the cause is unknown, the site earns money or holds customer data, or the infection keeps coming back.
| Situation | DIY is reasonable | Call a professional |
|---|---|---|
| You have a recent backup you know is clean | Yes, restore it, then update and change all passwords | If you are unsure the backup is clean |
| One known bad plugin or theme | Yes, replace it and scan | If other files also look changed |
| Unknown admin users or changed core files | Only if you are comfortable with SFTP and the database | Yes, a backdoor is likely |
| Infection returns after cleaning | No | Yes, the entry point is still open |
| Online store or customer data | No | Yes |
| Google or your host has flagged or suspended the site | Only after a full cleanup | Yes, if you cannot find all affected pages |
| You cannot log in | You can follow the WordPress.org password reset steps | If the account was taken over and you cannot regain control |
None of this replaces a proper investigation. The WordPress.org guide itself says that working out how attackers got in is often difficult for site owners.
What a WordPress malware removal service should include
A good WordPress malware removal service does more than delete a file: it finds the cause, cleans fully, restores, hardens and reports back in plain language. Use this checklist when you compare any WordPress malware removal service.
- A scan of files and database, not only a plugin run.
- A backup of the infected state before changes are made.
- Removal of backdoors, rogue admin users and injected database content.
- Replacement of core, theme and plugin files with clean copies.
- Updates for outdated software, and removal of unused plugins and themes.
- Password and secret key changes for all access points.
- Help with Google or host warnings, including the review request.
- A written summary of what was found, what was removed and what to change.
- Ongoing monitoring and backups after the cleanup.
Be careful with any provider that promises a guaranteed outcome or a fixed timeline before looking at your site. Every infection differs. If you want help comparing options, our guide to WordPress maintenance plans explains what ongoing care includes.
What to do after the cleanup
After the site is clean, change every password and key again, update the software, restore trust with Google and set up backups. The WordPress.org guide advises changing passwords after you are sure the site is clean, since earlier changes may have been captured.
- Change passwords again. Cover WordPress users, hosting, SFTP and the database. The guide also suggests considering a new database user and password, and updating wp-config.php to match.
- Replace the secret keys. Generate a new set with the WordPress key generator and paste them into wp-config.php to log out anyone still signed in.
- Update everything. Core, plugins and themes.
- Request a Google review if needed. In Search Console, open the Security Issues report. Google says to request a review only after all issues are fixed on all affected pages, and to explain the issue, the steps you took and the result. Do not resubmit while a request is pending. As documented when we reviewed it in November 2026, Google says reviews generally take a few days to a few weeks.
- Set up backups. Keep copies off the server and test a restore.
You can read the details in Google’s Security Issues report help page. If the site went offline during the incident, see our guide to what to do when your WordPress site is down.
How to prevent another infection
Most reinfections come from the same causes: outdated software, weak or reused passwords, and no backups. Prevention is a routine, not a one-off task.
A short routine covers most of it: apply updates after testing, remove unused plugins and themes, use unique passwords with two-step login, restrict who has admin access, keep off-site backups with a tested restore, and monitor for changes. Our WordPress security checklist lists each item in order.
A malware scanner plugin can help with WordPress malware removal and monitoring, but it is one layer. Software that is not updated stays vulnerable, however good the scanner is.
How Experts Grow handles WordPress malware removal
Experts Grow removes malware, restores clean files and hardens the site against future attacks. This is part of our WordPress maintenance services, and we also take over sites we did not build.
Need it done for you? See our WordPress malware removal service and send the contact form for a quote.
The work starts with a short health check of your site, hosting, plugins and backups. From there we clean the site, and then set up backups, security monitoring (malware scans, firewall rules and login protection) and uptime monitoring so problems are caught early. Updates are tested on a staging copy first, and backups are kept off-site with tested restores.
We do not publish a price, because it depends on the size and complexity of the site. After the health check we recommend a plan and give a clear price. Learn more about our WordPress care plans.
Frequently asked questions
What is WordPress malware removal?
WordPress malware removal is the process of finding and deleting malicious code, files and users from a hacked site, restoring clean files, closing the entry point and checking the site afterwards. It is more than deleting one infected file, because backdoors can bring the infection back.
Can I do WordPress malware removal myself?
A simple case can be handled yourself if you have a clean backup and are comfortable with SFTP. Follow the steps in the WordPress.org hacked-site guide. If you cannot find the cause, handle customer data or see the infection return, a professional is safer.
Are malware scanner plugins enough?
A scanner is a useful first step, but not the whole job. The WordPress.org guide says no single scanner is best and that combining plugin and remote scanners improves your odds. A scanner may miss a backdoor, and it does not close the hole the attacker used.
What does a WordPress malware removal service do?
A WordPress malware removal service scans files and the database, removes malicious code and rogue users, restores clean files, updates software, changes keys and passwords, and hardens the site. See our WordPress maintenance and support page for how we approach it.
How do I clean a hacked WordPress site without losing content?
Take a backup of the infected state first, then restore clean core files and remove only the malicious items. Your posts and media usually live in the database and uploads folder, so they can be kept, but both must be checked for injected code before you rely on them.
Why does the malware keep coming back?
Usually a backdoor was missed, or the original weakness is still open, such as an outdated plugin, a weak password or a compromised computer. Cleaning without hardening and finding the entry point leaves the door open. A full scan, update and password change helps.
How do I remove the Google warning after a hack?
Fix every issue on all affected pages, then open the Security Issues report in Search Console and select Request Review. Explain the issue, your fix and the result. Google says not to resubmit while a request is pending, and that reviews generally take a few days to a few weeks.
Should I change my passwords and keys?
Yes. Change passwords for WordPress, hosting, SFTP and the database, and replace the secret keys in wp-config.php to log out other sessions. The WordPress.org guide says to change passwords again once you are sure the site is clean.
Does Experts Grow clean hacked WordPress sites?
Yes. We remove malware, restore clean files and harden the site against future attacks, as part of our WordPress maintenance and support service. Pricing is recommended after a short health check, so there is no published price.
How can I stop WordPress malware in future?
Keep WordPress, plugins and themes updated, remove unused ones, use strong unique passwords with two-step login, and keep tested off-site backups. Add monitoring so changes are noticed early. Our WordPress malware removal advice above and our security checklist cover each step.
How do I remove a WordPress virus?
A WordPress virus is the same thing as WordPress malware: malicious code added to your site without your permission. Remove it by following the six steps in this guide: scan, contain, clean, restore, harden and verify. The most common mistake is deleting only the visible symptom and leaving a backdoor behind, which lets the virus return. If you cannot find the entry point or the infection keeps coming back, a professional cleanup is safer than repeated DIY attempts.
What is WordPress hack cleanup?
WordPress hack cleanup is the full process of removing malware from a hacked site: finding every infected file and database entry, replacing damaged core, theme and plugin files with clean copies, removing rogue admin users and backdoors, closing the hole the attacker used, and checking the site afterwards. It is more than deleting one infected file, because a hack usually plants several backdoors and changes more than one place.
How do I find a backdoor in WordPress?
Check the uploads folder for PHP files, because uploads should never contain PHP. Search your files for eval, base64_decode, gzinflate and str_rot13, list must-use and drop-in plugins, and check for admin accounts you did not create. WP-CLI makes this fast: find wp-content/uploads for PHP files, grep for the suspicious patterns, and list administrators with wp user list. Read each result before deleting anything, and re-scan after removing a backdoor.
Need malware removed from your WordPress site?
Think your site is infected, or want to avoid it? Tell us what you are seeing and we will start with a short health check of your site, hosting, plugins and backups. See our WordPress malware removal and care services, then contact Experts Grow for a health check and a recommended plan.