wp_users

Published: 3 Mar 2023

The wp_users table stores information about registered users. For each user, it contains essential data such as username (login), email, password, display name, status, and other details. Additional information can be stored in the wp_usermeta table.

Columns

ID: Integer user ID, which uniquely identifies each user. It is also referenced in other tables, such as wp_posts (posts made by the user), wp_comments (comments made by the user), and wp_usermeta.

user_login: Username which the user uses to log in to their account. For example, if the user's name is John Smith, their user_login might be "jsmith". Usernames must be unique and cannot be changed once set.

user_pass: The user's encrypted password. WordPress uses the MD5 hashing algorithm to encrypt passwords for security.

user_nicename: A "nice" version of the username. It is usually the same as user_login, but can also contain spaces or special characters.

user_email: The email address associated with the user's account. It is used for password resets and other communication with the user.

user_url: The user's website URL, if they have one. It is optional.

user_registered: The date and time when the user registered.

user_activation_key: Unique activation key that is sent to the user's email address when they first register. The key is used to activate the account.

user_status: Integer status code of the user's account. Possible values are 0 for inactive, 1 for active, and 2 for blocked.

display_name: The name that is displayed publicly on the website. It can be the same as username or it can also contain uppercase lettes, spaces, and special characters. For example, if the user's real name is John Smith, their display_name might be "John S" or "Johnny".

SQL Schema

CREATE TABLE `wp_users` (
`ID` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`user_login` varchar(60) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
`user_pass` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
`user_nicename` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
`user_email` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
`user_url` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
`user_registered` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`user_activation_key` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
`user_status` int(11) NOT NULL DEFAULT 0,
`display_name` varchar(250) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
PRIMARY KEY (`ID`),
KEY `user_login_key` (`user_login`),
KEY `user_nicename` (`user_nicename`),
KEY `user_email` (`user_email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

By remaining on this website or using its content, you confirm that you have read and agree with the Terms of Use Agreement.

We are not liable for any damages resulting from using this website. Any information may be inaccurate or incomplete. See full Limitation of Liability.

Content may include affiliate links, which means we may earn commission if you buy on the linked website. See full Affiliate and Referral Disclosure.

We use cookies and similar technology to improve user experience and analyze traffic. See full Cookie Policy.

See also Privacy Policy on how we collect and handle user data.

© 2024 WPDir