Creating another WordPress admin user using phpMyAdmin might be necessary in several scenarios:
- Lost Access to Existing Admin Account: If you’ve lost access to the existing admin account (e.g., you forgot the password and can’t reset it via email), creating a new admin user via phpMyAdmin allows you to regain control of your WordPress site.
- Email Issues: If the password reset email isn’t being sent or received due to misconfigured email settings or server issues, you can create a new admin user directly through the database.
- Compromised Admin Account: If your existing admin account has been compromised, creating a new one allows you to secure access to your site and take corrective actions.
- Site Migration or Database Restoration: After migrating a site or restoring a database backup, you might find that the admin account doesn’t work correctly. Creating a new admin user via phpMyAdmin can resolve access issues.
- Testing and Troubleshooting: If you’re troubleshooting issues on your WordPress site and need to isolate problems with user roles or permissions, creating a new admin account can be helpful for testing.
- Access During Development: During site development or testing, you might need an additional admin account to work with different settings or permissions without affecting the primary admin user.
1.Login to your cPanel account.
2.In search bar search the PHPMyAdmin
To find which wp_users table to open in phpMyAdmin, follow these steps:
- Access File Manager in cPanel:
- Log in to your cPanel account.
- Go to the File Manager.
- Locate wp-config.php File:
- Navigate to the public_html directory or the directory where your WordPress installation is located.
- Find and right-click on the wp-config.php file.
- Select View to see the content of the file.
- Copy Database Name:
Scroll through the wp-config.php file to find the line that defines the database name. It will look something like this:
php
Copy code
define(‘DB_NAME’, ‘your_database_name’);
- Copy the database name (e.g., your_database_name) and save it to a notepad file.
- Access phpMyAdmin:
- Return to cPanel and open phpMyAdmin.
- Select Database:
- In phpMyAdmin, locate the database name you copied earlier from the notepad file.
- Click on the database name to view its tables.
- Find and Access wp_users Table:
- In the list of tables, look for the table named wp_users.
- Click on the wp_users table to view its contents.
Follow these steps to view or manage user information or other details in the WordPress database.
4.Click on top side Insert tab
On the next screen, you’ll see a form that allows you to view and edit user details. The form typically includes fields for:
- user_login: Insert the username you want to use for your new admin user.
- user_pass: Add a password for the account and select MD5 in the Function drop-down.
- user_email: Add the email address you want to use.
- user_registered: Select the date and time for when this user should be registered.
- user_status: Set this value to zero.
You can use this form to update user information
Ignore the other fields for now; just leave them empty. Once you’ve filled in the necessary fields, scroll down to the bottom of the form and click Go to save your changes.
Once you click Go, a success message should appear, confirming that the process was successful. If you navigate back to the wp_users table, your new user should be listed there. Be sure to note the value in the ID column, as you’ll need it for the next step.
5.On the left-hand side, you will see the database tables. Click on wp_usermeta
Navigate to the wp_usermeta table:
- On the left-hand side, locate the list of database tables.
- Find and click on the table named wp_usermeta (or a similarly named table, depending on your WordPress database prefix).
Insert a new entry:
- Click on the “Insert” tab at the top of the page.
Fill in the following fields:
- user_id: Enter the ID of the user you created in the previous step.
- meta_key: Enter wp_capabilities.
- meta_value: Enter a:1:{s:13:”administrator”;s:1:”1″;}.
Leave all other fields empty and then click on Go.
To complete the user creation process, click on “Go.” Once done, you can log in to your WordPress site using the credentials you created in Step 4.

