Web Design and Development
Under normal circumstances, if you have lost access to the WordPress administration area, you can simply use WordPress’ password recovery feature to reset your password. However, there are some cases when this isn’t possible.1 Fortunately, if you can access the database directly, it is easy to add an admin user.
This tutorial will show you how to manually add an admin user via phpMyAdmin.2
If you have FTP access, the quickest way to retrieve the database details is by opening up the wp-config.php file located at the root of the WordPress installation.3 However, if you do not have access to this file, you can log into phpMyAdmin and verify that you are looking at the proper database by matching the site urls in the wp_options table.

You will now need to add a new user. On most installations, the table that you need to find is wp_users, as shown in the image at left.4 To get to the table, just click on the table’s name.
Next, click on the Insert tab. (You will find the insert tab in the horizontal list of links located across the top of the page. See the image at left.) This will bring up an insert form which will allow you to add new values to the table.
Now, enter following information in the fields:
After submitting the form, note the user ID that was automatically created for the new user account. You will need this to assign the proper administrator permissions.
Now, go to the wp_usermeta table and click the insert tab to go to the phpMyAdmin insert forms. You will need to add two rows. First, enter the following:
Now insert one more row with the following:
And that’s it. After inserting the above information, you can now go and log into the WordPress admin area using the new user account that you just created.
How to Add an Admin User to a WordPress Database : pramtecsolutions.com
Trackback URL:
Contact us today for a quote. Click here to submit details regarding your project.
If you are making a general inquiry, send an email to info@velvetblues.com
Excellent info; a keeper for sure, just in case.
However, for those like me, it might be easier to just start a new blog. LOL
Haha. Yes, you are good at that.
I was going for how non-techie I am, but I guess it is ironic timing. lol
Woo! Thanks! Bookmarked this just in case for some unlucky day.
This is a helpful little reminder.
Incidentally if you are doing these steps from a database tool that doesn’t make it easy to set a password, you should be able to put more or less anything in the password field, then use the ‘recover your password’ facility to set a new one.
Thanks for the excellent information.
And I need more help for the following point.
How to remove the website field in the user profile section in the wp-admin without affecting the core file.
THANK YOU:)