Step 1) Access Your MySQL Database
- Log into your Control panel
- Go to “Database” section
- Click on phpMyAdmin
Step 2) Go to the wp_users table
- Log into your cPanel/Control panel
- Go to “Database” section
- Click on PHPMyAdmin icon
Step 3) Insert a New Record in the Users Table
You will need to fill in the following fields to insert a new user record:
- ID – Keep the value of this field empty (it will automatically assign the correct value for it)
- user_login – insert the username you want to use
- user_pass – add a password for the account. Select MD5 in the functions menu (Refer to the screenshot below).
- user_nicename – leave this field empty for now
- user_email – add the email address you want to use for this account.
- user_url – leave this field empty for now
- user_registered – select the date/time for when this user is registered.
- user_status – set this to 0.
- display_name – leave this field empty for now
- Click on the Go Button (you should see a success message)
Step 4) Insert User Meta Values
This is the final step where we will assign some user meta values to the user account we just created.
Go to the “wp_usermeta” table and click on the “insert” link:
- unmeta_id – Leave it blank (it will be generated for you)
- user_id – This is the ID of the user we created in the previous step. For our case it is 2.
- meta_key – Use wp_capabilities
- meta_value – Use the following value for this field:
a:1:{s:13:"administrator";s:1:"1";}

Permisions
We will be editing the database rows using PhpMyAdmin tool given with cPanel by many hosting companies
Step 1: Open phpMyAdmin on cPanel.
Step 2: Open the wp_usermeta or xxx_usermeta table in the database as highlighted. (wp_ is just prefix, your table prefix may be different)
Step 3: In wp_usermeta table, you can find wp_capabilities under meta_key column.
Step 4: The roles are saved in form of serialized PHP array. Change the user role you want to assign to the current user by changing the meta_value as:
<p>Subscriber<br>a:1:{s:10:”subscriber”;b:1;}</p>
<p>Contributor<br>a:1:{s:11:”contributor”;b:1;}</p>
<p>Author<br>a:1:{s:6:”author”;b:1;}</p>
<p>Editor<br>a:1:{s:6:”editor”;b:1;}</p>
<p>Administrator<br>a:1:{s:13:”administrator”;b:1;}</p>
Leave A Comment?