Again, in case I forget: If you’d like to reset a WordPress password from the database or create a new administrative user:
- Generate a PHPass hash using this mainframe8 tool.
- Insert a new row, or update an existing row, in the wp_users table. Use the hash from the tool in the user_pass column.
- If you’re adding a new administrator, insert the following values into wp_usermeta and replace user_id (2 in this example) with the newly created account’s ID:
INSERT INTO wp_usermeta (`umeta_id` , `user_id` , `meta_key` , `meta_value`) VALUES (NULL , '2', 'wp_capabilities', 'a:1:{s:13:"administrator";b:1;}'), (NULL , '2', 'wp_user_level', '10');
- Enjoy a fixed WordPress admin account.
Comments are closed.