Creat an Admin Account on WordPress using MySQL
How to create an admin account on WordPress by modifying the MySQL database.
- 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.
- Copy an existing row in the wp_users table and modify accordingly or add a new row.
- 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.
- Save new wp_users table with new row that you just created.
- Open up the wp_usermeta table. Two rows will need to be added.
- Search for a row that includes meta_key: wp_capabilities and meta_value: a:1:{s:13:"administrator";s:1:"1";}
- Copy that row but replace the ID number with the ID number of the new user you created earlier.
- Search for a row that includes meta_key: wp_user_level and meta_value: 10
- Copy that row but replace the ID number with the ID number of the new user you created earlier.
- Save new wp_usermeta table with the two new rows that you just created.
- Done
You should be able to logon to your site: http://SITENAME.com/wp-login.php