Creat an Admin Account on WordPress using MySQL

How to create an admin account on WordPress by modifying the MySQL database.


  1. Use a MD5 hash generator to generate a new password.  The existing WordPress passwords in the database are salted, but WP will accept a plain MD5 hash.
  2. Copy an existing row in the wp_users table and modify accordingly or add a new row.
  3. In the user_pass field, paste in the MD5 that you created in step one.  Take note of the ID number, you will need this later.
  4. Save new wp_users table with new row that you just created.
  5. Open up the wp_usermeta table.  Two rows will need to be added.
  6. Search for a row that includes meta_key: wp_capabilities and meta_value: a:1:{s:13:"administrator";s:1:"1";}
  7. Copy that row but replace the ID number with the ID number of the new user you created earlier.
  8. Search for a row that includes meta_key: wp_user_level and meta_value: 10
  9. Copy that row but replace the ID number with the ID number of the new user you created earlier.
  10. Save new wp_usermeta table with the two new rows that you just created.
  11. Done
You should be able to logon to your site: http://SITENAME.com/wp-login.php


Popular Posts