Add new user admin via phpmyadmin wordpress
Here are the steps to add a new user as an administrator via phpMyAdmin in WordPress:
Prerequisites:
- You have access to phpMyAdmin and the WordPress database.
- You have the necessary permissions to modify the database.
Step 1: Log in to phpMyAdmin
- Open a web browser and navigate to the phpMyAdmin URL (e.g.,
http://example.com/phpmyadmin
). - Log in with your phpMyAdmin credentials (username and password).
Step 2: Select the WordPress database
- In the phpMyAdmin dashboard, select the WordPress database from the list of databases on the left-hand side.
Step 3: Go to the wp_users
table
- Click on the
wp_users
table in the database structure panel.
Step 4: Add a new user
- Click on the "Insert" button at the top of the table.
- Fill in the following fields:
user_login
: the username you want to create (e.g., "newadmin").user_pass
: the password you want to set for the new user (e.g., "newpassword").user_email
: the email address for the new user (e.g., "[email protected]").user_nicename
: the nickname for the new user (e.g., "New Admin").user_display_name
: the display name for the new user (e.g., "New Admin").role
: select "Administrator" from the dropdown menu.
- Click the "Go" button to create the new user.
Step 5: Update the wp_user_roles
table
- Click on the
wp_user_roles
table in the database structure panel. - Find the row with the
role_name
column set to "Administrator". - Update the
capabilities
column to include the following values:edit_posts
:true
edit_pages
:true
manage_categories
:true
manage_links
:true
upload_files
:true
moderate_comments
:true
manage_options
:true
- Click the "Go" button to update the table.
Step 6: Log in to WordPress as the new administrator
- Go to your WordPress dashboard and log in with the new administrator credentials (username and password).
That's it! The new administrator user should now be created and have the necessary permissions to manage your WordPress site.