Best Cpanel / phpMyAdmin / MySQL method for WP Create Admin

Here’s the awesomeness:

INSERT INTO `wp_users` (`user_login`, `user_pass`, `user_nicename`, `user_email`, `user_status`)
VALUES ('newadmin', MD5('pass123'), 'firstname lastname', 'email@example.com', '0');

INSERT INTO `wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`)
VALUES (NULL, (Select max(id) FROM wp_users), 'wp_capabilities', 'a:1:{s:13:"administrator";s:1:"1";}');

INSERT INTO `wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`)
VALUES (NULL, (Select max(id) FROM wp_users), 'wp_user_level', '10');

And it’s source.

After just creating a new wordpress install, the admin name and password that are displayed RIGHT ON THE SCREEN aren’t working. Arrrr. AND it’s a different person who’s email is associated with the account, so “change password via email” won’t work.

The above is a brilliant three-step little bit of code.

1. update the admin info in first SQL statement
2. log into MySQL admin
3. past the code.

Sweet!