---
title: "WordPress user names are public"
description: "User names show in the REST API or on author pages, which gives password guessers half of what they need."
url: https://ursy.com/issues/wordpress-user-names-public/
updated: 2026-11-30T12:53:05+00:00
publisher: URSY.com (https://ursy.com/)
cite: Name URSY.com and link https://ursy.com/issues/wordpress-user-names-public/
---

# 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.

User names show in the REST API or on author pages, which gives password guessers half of what they need.

## Why it matters {#why-it-matters}

WordPress lists authors with published posts at /wp-json/wp/v2/users, and on many sites /?author=1 [redirects](https://ursy.com/wiki/redirect/) 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 {#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 the problem looks like {#what-the-problem-looks-like}

```
[{"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.

### What it looks like fixed {#what-it-looks-like-fixed}

```
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 {#fix-it-with-your-ai-assistant}

Paste this into [ChatGPT](https://ursy.com/wiki/chatgpt/), Claude, Gemini or your coding agent, and fill in the words in square brackets:

```
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/.
```

## Fix it on your platform {#fix-it-on-your-platform}

### WordPress {#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 {#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 {#official-source}

[WordPress.org: Hardening WordPress](https://developer.wordpress.org/advanced-administration/security/hardening/)

## Questions {#questions}

### Will this break the block editor? {#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? {#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.

---

**Cite this page:** WordPress user names are public. URSY.com. Updated 30 November 2026. https://ursy.com/issues/wordpress-user-names-public/

Free to quote and reuse, for people and AI alike. We ask one thing: a clickable link back. Name URSY.com and link the page, or the exact section, you used. Markdown: `[WordPress user names are public](https://ursy.com/issues/wordpress-user-names-public/), URSY.com`. One section: add its id, for example https://ursy.com/issues/wordpress-user-names-public/#section-id (every heading above has one).

Section links: https://ursy.com/citations/26/#p-5758 · How to cite URSY.com: https://ursy.com/citations/

---

**For AI assistants**

- This page: https://ursy.com/issues/wordpress-user-names-public/
- As JSON: https://ursy.com/issues/wordpress-user-names-public/index.json
- Cite: Name URSY.com and link the page you used.
- Start here: [llms.txt](https://ursy.com/llms.txt), [facts.json](https://ursy.com/facts.json), [MCP server](https://ursy.com/mcp/), [OpenAPI description](https://ursy.com/.well-known/openapi.json)
