I lost my wordpress admin information! I can’t login to wordpress admin! If you are experiencing such problems, you can also create a user for WordPress through the database.
There is a phpMyAdmin application for MySQL management in panels such as cPanel and Plesk. Since it is more common, I will describe how to create a WordPress user via cPanel.
First of all, we open cPanel from our host panel. Click phpMyAdmin from the cPanel menu.
We click on the wp_users table and click the Add button at the top of the page.
Fill in the fields in the following page.
ID : give any number here, will be needed later
user_login : type your username
user_pass : type your password, then select MD5 from the left side.
user_nicename : type your name
user_email : type your e-mail address
user_status : set this field to 0 (ZERO)
display_name : display username (your name)
After entering the information, click the Go button in the lower right corner. If you see the green confirmation text, you have completed the first transaction. It’s time to define privileges for this user.
We click on the wp_usermeta table in the left tables and click the Add button at the top of the page.
umeta_id : leave this field blank
user_id : let’s write the user ID number I just created here (123)
meta_key : wp_capabilities
meta_value : a:1:{s:13:”administrator”;b:1;}
Then again, click the Go button in the lower right corner.
Click the Add button at the top again, this time fill in the fields as follows.
umeta_id : leave this field blank
user_id : let’s write the user ID number I just created here (123)
meta_key : wp_user_level
meta_value : 10
Click the Go button in the lower right corner.
Congratulations! You can now log in as an administrator. Please remember to create strong passwords. Your database prefix may be something other than wp_ , beware.