Short answer: open wp-content/mu-plugins through your hosting file manager, SFTP or SSH, list every file, and confirm each one belongs to your host or a plugin you knowingly installed. Any unknown PHP file, especially one with obfuscated code, random names or recent dates you cannot explain, should be copied aside for analysis and removed, followed by a full site check. Because must-use plugins load automatically and do not appear in the normal Plugins screen, this folder is a favourite hiding place for backdoors.
We learned this first-hand: in November 2026, malware on one of our WordPress sites lived in mu-plugins. The normal plugin list looked clean, and the malicious code ran on every page load until we inspected the folder directly.

What mu-plugins are
“Must-use” plugins are PHP files placed in wp-content/mu-plugins. WordPress loads them automatically on every request, before normal plugins, and they cannot be deactivated from the dashboard. They are legitimately used by managed hosts (for caching, security or staging tools) and by developers for site-wide code. WordPress lists them under Plugins > Must-Use only if the folder contains files with valid plugin headers, and even then a malicious file can omit the header and stay invisible.
Why attackers use mu-plugins
- Code runs on every page load, including admin pages.
- No activation step is needed.
- Site owners rarely look in this folder.
- The file can re-create other malware, add hidden admin users or inject spam and redirects.
- Security researchers have repeatedly documented campaigns hiding backdoors, redirects and spam injectors in mu-plugins.
Step 1: List the folder’s contents
Using your host’s file manager or SFTP, open wp-content/mu-plugins. Many sites do not have this folder at all, which is normal. With SSH and WP-CLI:
ls -la wp-content/mu-plugins/
wp plugin list --status=must-use
find wp-content/mu-plugins -type f -printf '%TY-%Tm-%Td %TH:%TM %s %p\n' | sort
Compare what you see with what the dashboard shows under Plugins > Must-Use. A file on disk that does not appear in the dashboard deserves close attention.
Step 2: Identify legitimate files
| Typical legitimate mu-plugin | Source |
|---|---|
| Host system plugins (caching, staging, login helpers) | Managed WordPress hosts |
| Security plugin loaders (some firewalls) | Your installed security plugin |
| Custom site code with your developer’s name | Your developer or agency |
| Object cache or performance helpers | Plugins you installed |
If unsure, search the exact file name together with your host’s name, or ask your host’s support whether they installed it.

Step 3: Inspect suspicious files
Open the file in a text editor (do not run it). Red flags include:
- Functions such as
eval(,assert(,base64_decode(,gzinflate(,str_rot13(orcreate_functionworking on long encoded strings. - Code that reads
$_POST,$_GETor$_COOKIEvalues and executes them. - Hooks that create users, such as calls to
wp_create_userorwp_insert_user, or that hide users from the admin list. - Remote requests to unfamiliar domains.
- No plugin header, random file names (for example
wp-cache-x9f.php) or names imitating core files. - Files dated around the time problems started.
Step 4: Remove safely
- Back up the site, and copy suspicious files outside the web root for evidence.
- Delete the malicious files from
mu-plugins. - Check for re-infection mechanisms: other backdoors in uploads, themes and plugins, server cron jobs, and unknown admin users (
wp user list --role=administrator). - Verify core and plugins:
wp core verify-checksumsandwp plugin verify-checksums --all. - Change all passwords and WordPress salts. See salts and keys.
- Find the entry point and fix it: vulnerable plugin, weak admin password, stolen hosting credentials.
If the file reappears after deletion, something else is restoring it. Follow our full malware removal checklist.
Step 5: Monitor going forward
- Add
mu-pluginsto your file-change monitoring. See monitoring WordPress file changes. - Set strict file permissions so the web server cannot freely write to it; see file permissions explained.
- Include the folder in every security check and audit.
Frequently asked questions
Is it safe to delete the whole mu-plugins folder?
Not without checking. Managed hosts may rely on files there. Remove only what you have confirmed is malicious or unneeded.
Why don’t security plugins always detect mu-plugin malware?
Malware that loads before normal plugins can interfere with scanners, and new obfuscated code may not match known signatures. Manual review closes the gap.
Can I disable mu-plugins?
You can rename the folder temporarily to stop them loading, which is useful during investigation, but check that your host’s tools do not break.
How often should I check this folder?
Automate a daily file-change check, and inspect it manually after any security incident or unexplained site behaviour.
Related: WordPress recovery timeline, where attackers hide backdoors.


