Add a Wordpress admin user via phpMyAdmin

Add a Wordpress admin user via phpMyAdmin

To add a WordPress admin user via MySQL, access your database using phpMyAdmin, navigate to the wp_users table, insert a new user record, and then add the user's capabilities to the wp_usermeta table. 

  1. Adding the User to wp_users Table:

    1. Click on the wp_users table (or the table with your WordPress prefix, like wp_f88a3a_users). 
    2. Click the "Insert" tab. 
    3. Fill in the following fields:
    4. user_login: The username for the new admin. 
    5. user_pass: The password for the new admin (select MD5 in the function dropdown). 
    6. user_email: The email address for the user. 
    7. user_status: Set to 0. 
    8. Click "Go" to insert the user. 
    9. Note the user id of the new user for the next steps.
  2. Adding User Capabilities to wp_usermeta Table:

    1. Click on the wp_usermeta table (or the table with your WordPress prefix, like wp_f88a3a_usermeta). 
    2. Click the "Insert" tab. 
    3. Fill in the following fields:
    4. user_id: The ID of the new user (obtained from the wp_users table). 
    5. meta_key: wp_capabilities. 
    6. meta_value: a:1:{s:13:"administrator";s:1:"1";}. 
    7. Click "Go" to insert the capabilities metadata. 
  3. Repeat the above step (use same table) to set the user level to 10:

    1. user_id: The ID of the new user. 
    2. meta_key: wp_user_level. 
    3. meta_value: 10. 
    4. Click "Go" to insert the user level. 
  4. Verify the New Admin:

    1. Log out of your WordPress dashboard (if you are logged in).
    2. Try logging in with the new admin credentials.