Steps to add an Admin user to the WordPress database from phpMyAdmin:
- Log in toย cPanel.
- Navigate to theย Databasesย section and click onย phpMyAdmin.
- Choose yourย database. It might be possible that you have multiple databases in your phpMyadmin.
So to find the appropriate database name just follow these steps:
- On theย cPanelย dashboard, click onย File Manager.
- Go to theย public_htmlย folder and click onย wp.
- On the right side, you will get files and folders in that, right-click on theย wp-config.phpย file and click on theย viewย option.
- In this section, you will see theย database name.
- Now, go back toย phpMyAdminย and click on theย databasename_usersย table. In our case, the database table name is this.
- Click onย Insert.
- Fill the required information in the mentioned fields.
- In theย user_passย dropdown, selectย MD5.
- Click onย Go.
- Click on theย databasename_usersย table.
- As you can see the recently added record withย ID. In the next step, we will use thisย idย in theย user_idย field.
- Select theย databasename_usermetaย table and click onย Insert.
- Enter the id of the user which we have created in the previous query.
- In theย meta_keyย textbox, enter theย databasename_capabilities. In our case,ย meta_keyย is this.
- In theย meta_valueย textbox add this code:ย a:1:{s:13:โadministratorโ;s:1:โ1โณ;}
- Again in this section, enter theย user_id.
- In theย meta_keyย textbox, enter theย databasename_user_level. In our case,ย meta_keyย is this.
- In theย meta_valueย textbox, enter the value asย 10.
- Click onย Go.
Now, follow the steps to check the newly added admin user in WordPress:
- Log in toย WordPressย with a newly createdย username and password.
- Click onย Users.
- As you can see the newly createdย usernameย withย Administratorย role.
Thatโs how you can add an admin user to the WordPress Database from phpMyAdmin.









