Guides

Found A Plugin You Didn't Install? How To Check WordPress For Malware

How to check WordPress for malware after finding a plugin you didn't install, in four steps

You're updating a site and spot a plugin you never installed, from a developer you've never heard of. Or your host emails you to say it found malware on your account. Either way, you need to know what's really going on before you delete anything. If you want to check WordPress for malware, this article will help you.

We are here to help you find out whether your site was hacked, where to look, and how to clean it up safely. This guide is based on three recent threads in the WordPress.org Fixing WordPress forum and the official "FAQ My site was hacked" guide. We also added harmless test plugins to our WordPress 7.1.5 test site in WordPress Playground, named Rahul Vithala, to show what to look for. We did not install real malware.

Related Articles

Is An Unknown Plugin Always Malware?

Not always, but take it seriously. In one recent forum thread, someone updating a client's site found an inactive plugin from a developer they had never heard of. The developer's name wasn't a link, and searching online turned up nothing. A WPMU DEV support team member replied that malware sometimes installs suspicious plugins. Another forum member said to treat an unknown plugin with no public developer page as untrusted, even if it's inactive.

Here's how a plugin like that looks. We added a harmless test plugin with no website to our test site.

WordPress Plugins screen listing Hello Dolly with a View details link and a Test Unknown Plugin by Test Author with no links
Our harmless test plugin on the Rahul Vithala test site. Hello Dolly, from WordPress.org, has a View details link. Our test plugin has none, and its author name is plain text.

WordPress shows a View details link when it has update information for a plugin, usually because it's on WordPress.org. It shows a Visit plugin site link if the plugin lists a website, and links the author's name only if the plugin lists an author website. A plugin with none of these isn't proof of malware. It might be a custom plugin a developer built for you, or a premium plugin. But you should be able to find out where it came from.

Step 1: Back Up Before You Delete Anything

Your first instinct may be to delete the plugin. Wait. Forum members in that thread suggested these steps first:

  • Make a full backup of your files and database, and keep it off the server. One forum member warned that if the server itself was hacked, a backup stored on it isn't safe to restore.
  • Download a copy of the suspicious plugin's folder.
  • Note the folder's date. Another member said it tells you roughly when the attacker got in, and which backups are still clean. Dates can be faked, though, so treat it as a clue, not proof.

The official hacked-site guide agrees: before cleaning, take one more copy of the site, even if it's infected. Our guide to backing up WordPress shows how.

Step 2: Check The Places Malware Hides

Must-Use Plugins

Go to Plugins and look for a Must-Use link at the top. If you don't see it, don't assume the folder is empty. On Multisite it's under Network Admin, and code can hide it, so also open wp-content/mu-plugins in your File Manager or FTP.

WordPress Plugins screen with the Must-Use tab open, saying files in the wp-content/mu-plugins directory are executed automatically, listing a Test Must-Use Plugin
The Must-Use tab on our test site, showing a harmless test file we added to wp-content/mu-plugins.

WordPress automatically runs every PHP file placed directly in wp-content/mu-plugins, and you can't switch these plugins off from the dashboard. A file there can also load code from subfolders, so check the whole folder. To remove a must-use plugin, you delete its file. But don't delete one just because you don't recognize it. According to the WordPress documentation, web hosts often use must-use plugins for their own features, so ask your host first.

Users And Registration Settings

In another thread, a site owner found admin accounts created by hackers on one site, then four new administrators on two of their other sites. Go to Users and filter by Administrator. Before you delete an account you don't recognize, check that it doesn't belong to a colleague, client or your host, and note when it was created. That's the user_registered column, in UTC, of the users table (usually wp_users) in phpMyAdmin. A forum member also suggested a database check for hidden admins: list every user with the administrator role and compare it with the people you know.

A forum member in that thread also suggested checking Settings → General, because attackers sometimes change these two settings. On our fresh test site, they looked like this:

WordPress General Settings showing Membership with Anyone can register unticked and New User Default Role set to Subscriber
The default Membership settings on our fresh test site: Anyone can register is off, and new users get the Subscriber role.

Application Passwords

Go to Users → Profile and scroll to Application Passwords, then do the same for every other administrator under Users → All Users → Edit. These let apps sign in through the REST API or XML-RPC. A forum member suggested revoking any you don't recognize. We created one called "Test app" on our test site to show where they appear.

WordPress Application Passwords section on the user profile screen, listing Test app with a Revoke button and a Revoke all application passwords button
The Application Passwords section on our test site, with the test password we created and its Revoke button.

Files Outside The Dashboard

Some places can only be checked with your host's File Manager or FTP. Forum members suggested looking at these:

  • wp-content/uploads: PHP files you don't recognize.
  • .htaccess: redirect rules you didn't add.
  • wp-config.php: code added at the very top or bottom.
  • Cron jobs in your hosting panel: entries you didn't create. One forum member said a cron job that re-downloads malware is a common reason sites get infected again after a cleanup.
  • Nulled plugins and themes: premium copies that didn't come from the official seller. Another member said that on sites they take over, these are one of the most common ways in, and because they can't be updated, the hole stays open.

Step 3: Scan The Site, But Don't Trust One Scan

The official hacked-site guide lists plugin-based scanners (Quttera, GOTMLS, Wordfence and Sucuri) and remote scanners that crawl your site (VirusTotal and Sitecheck), and says using both improves your odds. Forum members recommended free Wordfence. One said it compares core files, and themes and plugins from WordPress.org, with the official copies. Premium and custom code can't be compared this way. We didn't test these scanners for this guide.

Keep one warning from a forum moderator in mind. A scan runs inside a site that may already be hacked, and the hacker can change what the scan sees. Another forum member suggested that if your host found the malware, you ask it for the exact file paths, so you can check those files directly.

Step 4: Clean Up And Lock Everything Down

The moderator's advice was clear: the safest cleanup is restoring a clean backup. If you have one, first make sure it's complete, from before the attack, and saved off the server. Then delete that site's files and database, restore the backup, and change all your access details. If you don't, your host may have one.

Then close the door the attacker used:

  1. Change every password: WordPress admins, hosting, FTP or SFTP, and the database. If you change the database password, update DB_PASSWORD in wp-config.php straight away, or your site will stop loading. The official guide says to change them all again once the site is clean.
  2. Replace the security keys in wp-config.php. WordPress's sample config file says this forces every user to log in again.
  3. Update or remove vulnerable plugins and themes. A forum member warned that restoring a backup also brings back whatever let the attacker in.
  4. Check every site on the same hosting account. The official guide warns that a hack can affect more than one site on shared hosting.
  5. Scan your own computer. The guide also says some attacks start with stolen logins from an infected computer.

If this feels like too much, the moderator suggested finding someone to help on jobs.wordpress.net.

Common Mistakes To Avoid

  • Deleting the plugin first: you lose the file dates that give you a rough idea of when the attacker got in.
  • Keeping your only backup on the same server: it may be infected too.
  • Deleting every file a scanner flags: check the list first, so you don't break your site.
  • Restoring a backup and stopping there: fix the way in, or the attacker can come back.

Check WordPress For Malware: FAQs

Is an inactive plugin dangerous?

WordPress doesn't load inactive plugins, but their PHP files are still on your server, and a file can still run if someone visits its address directly. If you didn't install it and can't find where it came from, treat it as untrusted, as forum members advised.

Can I delete a must-use plugin?

Not from the dashboard. Delete its file from wp-content/mu-plugins, but ask your host first, because hosts often add their own.

How do I know when the hack started?

Check the date on the suspicious plugin's folder and the registration date of any unknown admin account. Neither is proof, and the first break-in may be earlier, but they help you pick a backup from before the attack.

Final Words

To check WordPress for malware, back up first, then look at must-use plugins, users, settings, application passwords and the files outside the dashboard. Scan the site, but trust a clean backup more than any scan. Let us know in the comments what you found on your site.

Sources

We checked these sources for this guide on November 30, 2026:

#Beginners#Security#Troubleshooting