Database navigation guide
Where is the WordPress users table?
Find the correct wp_users-style table before you inspect or recover an authorized account. The name depends on the site’s table prefix and, in multisite, the site ID.
wp_users is only the default.A custom installation prefix changes the table name, for example to client_users.
usermeta is a companion table.Roles and capabilities usually live in the matching _usermeta table, not in _users.
Network users are shared, while sites can use numbered table prefixes for their own content.
Start with the configured table prefix
The most reliable answer is in the site’s wp-config.php. Look for the line that sets $table_prefix. If it is wp_, the expected users table is wp_users. If it is client_, it becomes client_users.
$table_prefix+2 Add users→3 Open matching table
Do not assume the database is named after the domain, and do not use a table merely because it contains the word “users.” Hosting accounts often contain staging, old, and unrelated WordPress installations in the same database server.
A prefix mismatch after a migration is one of the most common causes of a broken-looking site — see login failures after a migration if that's what brought you here.
Find it with one query instead
Reading $table_prefix is the reliable answer, but it assumes you can open wp-config.php. From a database client you can ask the database directly — and on a hosting account holding several old installs, that is often the faster route to the truth.
-- Inside the database you believe the site uses. SHOW TABLES LIKE '%users';
One result is the easy case. Several means this database holds more than one WordPress install, and the prefix is the only thing that tells them apart — which is exactly the situation where picking the wrong one produces a recovery that appears to work and changes nothing.
-- When you do not know which database, let alone which prefix. -- Lists every users-style table the connection can see, and where it lives. SELECT table_schema AS db, table_name, table_rows FROM information_schema.tables WHERE table_name LIKE '%users' ORDER BY table_schema, table_name;
information_schema is a virtual database every MySQL and MariaDB server exposes, listing the structure of everything the connected user has rights to. A shared-hosting account usually sees only its own databases, which is what makes this practical rather than alarming. The table_rows estimate is a useful tiebreaker: a staging copy abandoned two years ago rarely has the same user count as the live site.
Confirm with a row before you trust the name — the table you want has user_login, user_email and user_pass columns. Anything called users without a prefix, or without those columns, belongs to some other application sharing the server.
Recognize the table you need
wp_usersDefault single-site users tableConfirm that $table_prefix is wp_.client_usersCustom-prefix users tableCheck for $table_prefix = 'client_';.wp_usermetaMetadata for the matching users tableUse it to inspect roles only after identifying the right user.wp_2_postsA multisite site tableThe number identifies a site; do not infer the shared users table from posts alone.What is actually in these two tables
The columns in wp_users
Ten columns, and only one of them is a credential. Knowing the rest is what stops a recovery turning into an accidental account edit.
IDThe numeric user ID every other table refers to. Not a reliable way to identify the administrator.user_loginThe username typed at the login form. WordPress does not let you change it from the dashboard, which is why people reach for the database.user_passThe password hash — $wp$2y$, $P$, plain bcrypt or legacy MD5. The only column a password recovery should touch.user_nicenameA URL-safe version of the name, used in author archive slugs. Changing it changes those URLs.user_emailWhere a reset link goes. Worth confirming before you start a recovery that depends on email.user_urlThe optional website field from the profile screen. Cosmetic.user_registeredThe account's creation timestamp in UTC. A good sanity check that you are looking at the live database rather than an old export.user_activation_keyA temporary token for a pending password reset. Empty most of the time; clearing it cancels an outstanding reset link.user_statusA legacy column WordPress no longer uses on single sites. Leave it at 0.display_nameThe name shown publicly. It is not the login, and editing it does not affect sign-in.Multisite adds two more — spam and deleted — which the network uses to suspend an account without removing its content.
Roles live in wp_usermeta, under a prefixed key
There is no role column in wp_users. A user's role is a row in the meta table whose meta_key is the site's table prefix followed by capabilities — wp_capabilities by default, client_capabilities on a site with a custom prefix — holding a serialized PHP array.
SELECT u.ID, u.user_login, m.meta_key, m.meta_value 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%';
The stored value looks like a:1:{s:13:"administrator";b:1;}. That string length — s:13 — has to match the word that follows it, which is why hand-editing serialized data breaks roles so reliably, and why the prefix in the meta key is the thing everyone forgets when changing a table prefix: rename the tables without renaming this key and every user silently loses their role.
Find it in phpMyAdmin, step by step
- 01Open the database named in
wp-config.php.Match
DB_NAMEto the database selector before browsing any tables. - 02Find the prefix, then locate
_users.Use the configured prefix as the first filter. A table ending in
_usersshould have fields such asID,user_login,user_email, anduser_pass. - 03Confirm the exact authorized account.
Search by
user_loginoruser_email, never by a row number or a display name that might be duplicated. - 04Leave unrelated tables alone.
Do not edit
usermeta, roles, or site content merely to recover a password. Make the smallest necessary change.
Use WP-CLI when you have shell access
WP-CLI can read the active configuration, which removes much of the naming guesswork. These commands are read-only and help confirm the prefix and tables WordPress recognizes.
wp db prefix
wp db tables --all-tables-with-prefix
WP-CLI can also reset a password directly once you've confirmed the account — see the WP-CLI password reset guide.
On multisite, users are the exception
The confusion about numbered tables comes from a real asymmetry: content is per-site, identity is not. Site 2's posts live in wp_2_posts, but site 2's users are rows in the same wp_users everyone else uses. There is no wp_2_users on a standard network.
- wp_users — every account on the network
- wp_usermeta — including each site's capabilities key
- wp_blogs — one row per site in the network
- wp_site / wp_sitemeta — the network itself and its settings
- wp_signups — pending registrations
- wp_2_options, wp_2_posts, … — site 2's own content
A user who belongs to three sites has one row in wp_users and three capability rows in wp_usermeta — wp_capabilities, wp_2_capabilities, wp_3_capabilities. Removing someone from one site deletes that site's key, not the account.
Two consequences follow. A password reset applies network-wide, because there is only one hash to change. And an account that can sign in but sees “You do not have sufficient permissions” on one site has its identity intact and its capabilities row missing for that site — a different problem from a password one, and not fixed by resetting the password again.
Before you edit a user record
- Confirm you are administering the correct site and have a recoverable backup.
- Match
DB_NAMEand$table_prefixto the table you opened. - Identify the authorized user by login or email, then change only the required field.
- Prefer the normal reset route or WP-CLI before a direct database edit.
Quick answers
Is it safe to rename the table prefix?
It's possible but not routine — every plugin, theme, and serialized option that references the prefix has to be updated consistently, and a partial rename breaks the site. Most sites never need to; see changing the table prefix safely if you have a real reason to.
What's stored in the usermeta table if not the password?
Roles and capabilities, the user's display name preferences, admin color scheme, dismissed notices, and plugin-specific per-user settings — all as flexible key/value rows tied to a user ID, rather than fixed columns like user_pass.
Why do I see numbered tables like wp_2_options on multisite?
The number is the site ID inside the network, and those tables hold that site's own content and settings. Users are the exception: a standard network has no wp_2_users at all, because every account lives in the shared wp_users table no matter how many sites it belongs to.
How do I find the users table without opening wp-config.php?
Run SHOW TABLES LIKE '%users'; inside the database, or query information_schema.tables for the same pattern when you do not know which database the site uses. Confirm the match by checking the table has user_login, user_email and user_pass columns before you touch anything in it.
Primary references: WordPress database table-prefix reference and WP-CLI: wp db tables.