WordPress user names are public
User names show in the REST API or on author pages, which gives password guessers half of what they need.
Why it matters #
WordPress lists authors with published posts at /wp-json/wp/v2/users, and on many sites /?author=1 redirects to /author/name/. The name shown is often the sign-in name, which is half of what someone guessing passwords needs.
It is a clue rather than a hole: strong passwords and two-step sign-in matter much more. But many attacks start by collecting user names this way.
How to fix it #
Limit the users route of the REST API to signed-in visitors with a security plugin or a few lines of code. Do not switch off the whole REST API, because the block editor needs it. Most security plugins can also stop the author-number redirects.
Make sure no account uses a guessable name such as admin, and use strong passwords and two-step sign-in for every administrator. Check with the WordPress Security Checker.
What it looks like, and fixed #
[{"id": 1, "name": "admin", "slug": "admin",
"link": "https://www.example.com/author/admin/"}]
What /wp-json/wp/v2/users can show anyone: the slug is often the sign-in name.
add_filter( 'rest_endpoints', function ( $endpoints ) {
if ( ! is_user_logged_in() ) {
unset( $endpoints['/wp/v2/users'], $endpoints['/wp/v2/users/(?P<id>[\d]+)'] );
}
return $endpoints;
} );
In a small custom plugin: the users route is hidden from signed-out visitors, while the block editor keeps working for you.
Fix it with your AI assistant #
Paste this into ChatGPT, Claude, Gemini or your coding agent. Fill in the words in [square brackets] first. It checks before it changes anything, changes only this, and tells you how to prove it worked.
Help me protect the accounts on [your website address], a WordPress site. A checker says user names are public through /wp-json/wp/v2/users or author pages such as /?author=1. First check: ask me what those two addresses show in a private window, and which plugins I use that might need the REST API. Explain plainly what is exposed. Then give me the fix: limit the users route of the REST API to signed-in visitors with a small custom plugin or a security plugin setting, and stop the author-number redirect. Rules: do not switch off the whole REST API, because the block editor and many plugins need it; back up first; keep author archive pages working if I use them; and do not change any page addresses. Also tell me to rename any account called admin, use strong passwords and turn on two-step sign-in for administrators. Give exact code and where it goes. Finally, tell me to re-check with the URSY.com WordPress Security Checker at ursy.com/wordpress-security-checker/.
We find the problems, and help you fix them
- Check Run a free tool or the full audit.
- Fix it with your AI Download your AI Fix Pack and drop it into ChatGPT, Claude or Gemini. A free account is enough.
- Re-check Come back, check again, and watch each fix turn green.
Fix it on your platform #
WordPress
Use a security plugin option or the code above to limit the users route, and stop author-number redirects. Set each account's "Display name publicly as" to something other than the sign-in name, and turn on two-step sign-in for administrators.
Check it is fixed #
Open /wp-json/wp/v2/users in a private window: it should not list your users. Run the WordPress Security Checker again and it should not report public user names.
Official source #
Questions #
Will this break the block editor?
Not when you limit it to signed-out visitors only. The editor works while you are signed in.
Does this mean my site has been hacked?
No. WordPress lists authors this way by default. It is a clue for attackers, so strong passwords and two-step sign-in are what really protect you.
More problems in Security and HTTPS
- A form sends its data over plain http High priority
- Hidden instructions aimed at AI assistants High priority
- http:// does not redirect to https:// High priority
- Mixed content: files loaded over plain http High priority
- The certificate does not cover this address High priority
- The certificate has expired or is not valid yet High priority
- The certificate is not trusted by browsers High priority
- The https page redirects back to http High priority