Unknown Admin Users on Your WordPress Site

By Bug Circuit Security Team
Unknown Admin Users on Your WordPress Site

Is your own website affected? Check it free in 2 minutes.

Passive outside check only. Nothing is attacked, no signup.

If you found WordPress admin users you never created, treat the site as compromised: list every admin, delete the ones you cannot vouch for, reset all passwords and security keys, then find the backdoor that created them, or they will come back.

This guide is for owners of WordPress sites who opened the Users screen and saw a name they do not recognize. You will get exact steps in the dashboard and in WP-CLI (the command-line tool for WordPress), a table of the usual hiding places for backdoors, and a cleanup order that lasts. You do not need to be a developer, but you will need access to your hosting panel or SFTP.

If the site is also showing spam pages, redirects or a warning from your host, read our hacked website guide alongside this one.

Why unknown admins appear in the first place

An admin account is the master key to a WordPress site. Attackers who get in once often create their own admin so they can return even after you change your password.

The common routes are a vulnerable plugin or theme, a stolen or guessed password, or a leaked hosting login. The account is a symptom. The way in is the real problem, and that is why deleting the user alone is not a fix. WordPress's own hardening guide explains why keeping software updated and limiting admin access matters: WordPress Hardening.

Step 0: Take a backup and note what you see

Before you change anything, copy the site files and database. Your host's backup tool is fine. This is your evidence and your safety net.

Write down each unknown username, email address and when it was created. You will need those details later when you check logs.

Step 1: List every admin in the dashboard

  1. Go to Users > All Users.
  2. Click the Administrator filter at the top.
  3. Check each account against the people who really manage the site.

Look at the number in brackets next to Administrator. Compare it to the rows you can see. If the count is higher than the list, something is hiding accounts from the screen, which is a strong sign of malware.

Also open Settings > General. Confirm Anyone can register is off, unless you run a membership site on purpose. Confirm New User Default Role is Subscriber. Attackers sometimes flip these so new sign-ups become admins.

Step 2: Verify the admins with WP-CLI

The dashboard can be fooled by malicious code. The database cannot be hidden from as easily. Log in over SSH, go to the folder that contains wp-config.php, and run:

wp user list --role=administrator --fields=ID,user_login,user_email,user_registered

The user_registered column shows when each account was created. An admin that appeared at 3 a.m. on a day nobody on your team logged in is suspect. See the WP-CLI user command docs for more options.

To bypass anything a plugin might be hiding, query the database directly. Replace wp_ with your table prefix if it is different (wp db prefix shows it):

wp db query "SELECT u.ID, u.user_login, u.user_email, u.user_registered FROM wp_users u JOIN wp_usermeta m ON m.user_id = u.ID WHERE m.meta_key = 'wp_capabilities' AND m.meta_value LIKE '%administrator%';"

If this lists someone that wp user list did not, a hiding mechanism is installed. Keep that in mind for Step 6.

How to judge an account

SignProbably fineTreat as rogue
Email addressYour domain or a person you knowRandom domain, or one that looks almost like yours
CreatedMatches a known hire or projectOdd hour, or a day nobody was working
UsernameA real personadmin2, support, wpadmin, random letters
Visible in dashboardYesCount mismatch, or only shows in the database

If you are unsure about an account, ask the person. If nobody can vouch for it, remove it.

Step 3: Remove the rogue accounts

In the dashboard, hover over the user and click Delete. WordPress asks what to do with their content. Choose Attribute all content to a real admin, unless the account created spam posts you want gone.

With WP-CLI, use the ID from the list. Here 7 is the rogue user and 1 is your real admin:

wp user delete 7 --reassign=1

If a rogue account exists but you do not want to delete anything yet, lower its role first with wp user set-role 7 subscriber. Then delete it once you have copied the details you need.

Do this early, but do not stop here. If the backdoor is still in place, the account can be re-created within minutes or hours.

Step 4: Reset passwords and application passwords

Reset the password of every real admin, and of editors and shop managers if the attacker could have read your database. Use long, unique passwords from a password manager. This prints a new password without emailing it:

wp user reset-password 1 --skip-email --porcelain

Then open each remaining admin's profile and scroll to Application Passwords. Revoke any you do not recognize. Application passwords are separate logins for apps and scripts, and they keep working after a normal password change.

Turn on two-factor authentication for every admin. Free plugins such as Two Factor (from WordPress.org) or WP 2FA handle this.

Also change these, since an attacker who reached your files may have read them:

  • Your hosting panel and SFTP/SSH passwords
  • The database password (then update it in wp-config.php)
  • Passwords for any email account tied to the site admin address

Step 5: Reset the salts

Salts (also called security keys) are random strings in wp-config.php that protect login cookies. If an attacker holds a valid cookie, they stay logged in even after a password change. Changing the salts logs everyone out, including the attacker.

wp config shuffle-salts

This rewrites the eight key and salt lines in wp-config.php. See the shuffle-salts docs. Without WP-CLI, generate new values at https://api.wordpress.org/secret-key/1.1/salt/ and paste them over the old lines in wp-config.php. Expect to log in again afterward.

Step 6: Find the backdoor that re-creates them

This is the step most guides skip, and it is why cleanups fail. A backdoor is hidden code that gives the attacker access without a normal login. Start with the files WordPress can check for you:

wp core verify-checksums
wp plugin verify-checksums --all

These compare your core and plugin files with the official copies. Anything reported as modified or unexpected deserves a close look. Details are in the verify-checksums docs. Note that this does not check themes or your own custom files.

Next, search the usual hiding places:

Where to lookWhat to check
wp-content/uploads/This folder should hold images and documents, not code. Run find wp-content/uploads -name '*.php'. Any result is suspicious.
wp-content/mu-plugins/Must-use plugins load automatically and do not appear in the normal Plugins list. Open every file here.
Theme functions.phpLook for code you did not add, especially near the top or bottom of the file.
wp-config.php, .htaccess, .user.iniLook for unexpected auto_prepend_file, include lines or encoded text.
Scheduled tasksRun wp cron event list. A job with an odd name that runs every few minutes can re-create users.
Drop-ins in wp-content/advanced-cache.php, db.php and object-cache.php are valid files but are also used to hide code. Confirm you installed them.
Unused plugins and themesDeactivated code can still be attacked. Delete anything you do not use.

To find recently changed code, list PHP files edited in the last 14 days:

find . -type f -name '*.php' -mtime -14

Then search for functions attackers use to hide or create accounts:

grep -rIl --include='*.php' -E 'wp_create_user|wp_insert_user|base64_decode|gzinflate|eval\(' wp-content

Many legitimate plugins use some of these functions, so a hit is a lead, not proof. Look for hits in places they do not belong, such as the uploads folder, or in files that are not part of any plugin you installed.

Finally, check your server's access logs (your host can usually provide them) for requests around the time the rogue account was created. Look for POST requests to wp-admin/user-new.php, admin-ajax.php, wp-json/wp/v2/users, or to odd PHP files. Whatever file or plugin that request touched is a strong clue to the entry point.

Step 7: Close the door you found

A clean file system with the same hole still open is just waiting for round two. Do these in order:

  1. Replace WordPress core and every plugin and theme with fresh copies from official sources. wp core download --force --skip-content refreshes core files without touching wp-content.
  2. Update everything. Check each plugin's name and version against the National Vulnerability Database if you suspect a known flaw.
  3. Delete code you cannot account for. If you cannot tell what a file does, restore from a backup taken before the first unknown admin appeared, then update before going live.
  4. Re-run the user list from Step 2 a day later, and again a week later.

The pattern behind many of these break-ins is broken access control, where a plugin fails to check who is allowed to do something, such as create a user. Updating is the main defense, because the plugin author fixes the check.

When to get more help

If you find several backdoors, cannot work out how the attacker got in, or handle customer payment data, a full WordPress hacked website cleanup is worth handing to a specialist. WordPress's own guide is a good reference for the wider process: FAQ: My site was hacked.

Key takeaways

  • Compare the dashboard Administrator count with a direct WP-CLI or database query to catch hidden accounts.
  • Deleting the rogue admin is not enough. Reset every password, revoke application passwords, and run wp config shuffle-salts.
  • Search uploads, mu-plugins, cron jobs, theme files and wp-config.php for the backdoor, and use the access logs to find the entry point.
  • Update or remove vulnerable plugins and themes, then recheck your admin list after a day and a week.
  • Turn on two-factor authentication for every admin account.

What to do next

A cleanup removes what is there today. It does not tell you whether other weak spots remain. Our Essential audit ($49) is a manual security test by a real person that ends in a written report with every issue, its severity and fix steps. It is a small-site audit, not a malware removal service or a compliance certificate, and fixes are quoted separately.

If you want a quick outside look first, try the free website security check. To understand what a human tester finds that a scanner misses, read manual vs automated penetration testing.

Want certainty, not guesswork?

A real human security engineer audits your whole site by hand and sends a full report: every issue, its severity, and the exact fix. From $49, with a 14-day money-back guarantee.

See pricing

Frequently asked questions

Why are there unknown admin users on my WordPress site?
Most often an attacker got in through a vulnerable plugin, a stolen password or a leaked hosting login and created their own admin account to keep access. It can also be a former developer or a plugin that adds a support user. If nobody on your team can vouch for the account, treat it as a sign of compromise.
How do I find out if my WordPress hacked admin users were added through a backdoor?
Delete the account, reset passwords and salts, then watch whether it returns. If it does, a backdoor is running. Check `wp-content/uploads` for PHP files, review `mu-plugins`, theme `functions.php`, `wp cron event list`, and run `wp core verify-checksums` and `wp plugin verify-checksums --all`.
How do I list all admin users in WordPress with WP-CLI?
Run `wp user list --role=administrator --fields=ID,user_login,user_email,user_registered` from your site folder. The registered date helps you spot accounts created at odd times. For a check that malicious plugins cannot easily hide from, query the usermeta table directly.
Will deleting the unknown admin fix my hacked WordPress site?
No. Deleting the account removes one symptom, but the backdoor or vulnerable plugin that let the attacker in is still there. Reset passwords and salts, find and remove the backdoor, and update everything, or the account can be re-created.
Do I need to reset my WordPress salts after a hack?
Yes. Salts protect login cookies, so an attacker with a valid cookie can stay logged in even after a password change. Running `wp config shuffle-salts` replaces them and logs every user out, including the attacker.

Keep reading

See what attackers see, for free

Run the free passive check on your website. No login, no impact on your site, results in seconds.

Ready for the full manual audit? See pricing

Published by Bug Circuit. Written with AI assistance and reviewed for accuracy before publishing.