Add a new wordpress user via phpmyadmin
To add a new WordPress user via phpMyAdmin, you'll need to follow these steps:
Step 1: Log in to phpMyAdmin
Open a web browser and navigate to your website's phpMyAdmin URL (e.g., http://example.com/phpmyadmin
). Log in with your database credentials (username and password).
Step 2: Select the WordPress database
In the phpMyAdmin dashboard, select the database that contains your WordPress installation. This is usually the database with a name like wp_
followed by a random string (e.g., wp_example
).
Step 3: Navigate to the wp_users
table
In the database structure panel, click on the wp_users
table. This table contains all the user accounts in your WordPress installation.
Step 4: Add a new user
Click on the "Insert" tab at the top of the page. This will open a form where you can enter the new user's details.
Step 5: Enter the user's details
Fill in the following fields:
user_login
: The username you want to use for the new user (e.g.,newuser
).user_pass
: The password for the new user (you can use a password generator or create a strong password).user_email
: The email address associated with the new user.user_nicename
: A nickname for the new user (optional).user_url
: The URL associated with the new user (optional).
Step 6: Set the user's role
In the "Role" dropdown menu, select the role you want to assign to the new user. You can choose from the following options:
subscriber
: A basic user with limited privileges.contributor
: A user who can create and edit content, but not publish it.author
: A user who can create and publish content.editor
: A user who can create, edit, and publish content.administrator
: A user with full administrative privileges.
Step 7: Save the new user
Click the "Go" button to save the new user. phpMyAdmin will generate a unique user_id
for the new user.
Step 8: Update the wp_user_level
table (optional)
If you want to assign a specific level to the new user, you'll need to update the wp_user_level
table. This table contains the user level for each user in your WordPress installation.
To update the wp_user_level
table, follow these steps:
- Navigate to the
wp_user_level
table in phpMyAdmin. - Click on the "Insert" tab.
- Enter the
user_id
of the new user in theuser_id
field. - Enter the desired user level in the
user_level
field (e.g.,0
for a subscriber,1
for a contributor, etc.). - Click the "Go" button to save the changes.
That's it! The new user should now be added to your WordPress installation. You can log in to the WordPress dashboard using the new user's credentials to verify that the user has been created successfully.