You can create a new WordPress admin user from within the database. Use this method if your original admin user was corrupted or removed.

  1. Sign in to phpMyAdmin.
  2. In phpMyAdmin, in the left-side menu, select the name of the database your site uses.
  3. From the left-side menu, look for the users table and select that table (select the text, not the checkbox). For example, this table might be called wp_users in your menu.
  4. From the top menu, select Insert.
  5. In the Value column, enter the following:
    • FieldWhat it is…
      IDAny number that isn’t already used by another user.
      user_loginUsername for accessing the WordPress dashboard.
      user_passPassword for this user. 
      Note: Make sure to select MD5 in the Functions menu.
      user_nicenameThe nickname for this user.
      user_emailEmail address for this user.
      user_registeredThe date and time this user was registered.
      user_statusSet this to 0.
      display_nameName that will display for this user.
  6. On the right, select Go.
  7. From the left-side menu, look for the usermeta table and select that table (select the text, not the checkbox). For example, this table might be called wp_usermeta in your menu.
  8. From the top menu, select Insert.
  9. In the Value column, enter the following:
    • FieldWhat it is…
      user_idEnter the ID from step 4.
      meta_keyEnter wp_capabilities. Note: For Managed WordPress accounts or custom database table prefixes, replace wp_ with the correct prefix (such as coolPrefix_capabilities).
      meta_valueEnter the following: a:1:{s:13:”administrator”;s:1:”1″;}
  10. Select Go.
  11. Select the Insert tab again.
  12. In the Value column, enter the following:
    • FieldWhat it is…
      user_idEnter the ID from step 4.
      meta_keyEnter wp_user_level. Note: For Managed WordPress accounts or custom database table prefixes, replace wp_ with the correct prefix (such as coolPrefix_user_level).
      meta_valueEnter number 10.
  13. Select Go.

You can now sign in to WordPress with your new username and password.

More Info