3. Insert the new admin user’s details in the wp_users Table. In the insert form add the following details:

ID – Leave this field empty (system will automatically assign the correct value for it)user_login – insert the desired username you want to use to access the WordPress Dashboard.user_pass – Insert the desired password for this username. Make sure to select MD5 in the functions menu (Refer to the screenshot below).user_nicename – Add a desired nickname that you would like to refer yourself as.user_email – add the desired email you want to associate with this user account .user_url – add the url to your website.user_registered – select the date/time for when this user is registered.user_status – set this to 0.display_name – Add the desired name you like to display for this user on the website ( you can set this to your user_nicename value as well).
Then click on the Go Button

Now go back to the wp_users table and browser the entries to verify that the user record has been inserted successfully.

Take note of the value in the “ID” field for this newly created user (we will need this ID field’s value for the next step). In this case the ID value is 2.

4. Now go to wp_usermeta and click on Insert to add some user meta values to the newly created user account.

Add the following information to the insert form:

unmeta_id – leave this blank (it will be auto-generated)user_id – this will be the id of the user you created in the previous step. Remember we picked 4.meta_key – this should be wp_capabilitiesmeta_value – insert this: a:1:{s:13:”administrator”;s:1:”1″;}

Insert another row with the following information:

unmeta_id – leave this blank (it will be auto-generated)user_id – this will be the id of the user you created in the previous step. Remember we picked 4.meta_key – this should be wp_user_levelmeta_value – 10

Then click on go and you’ve got yourself a new admin user. Now you can login to your wordpress admin panel with the username and password you’ve specified for this user. Once logged in, click on Users and edit the user you just created. Scroll all the way down and click on Save button (you don’t need to change anything). This will allow WordPress to go through the properties for this user and add some more information and clean-up the user we just added.

SQL query:

This process is for developers who wants to speed up the process. Just copy the following snippets of sql code and replace them with appropriate information and you will have yourself a new admin user in no time.