Created
June 9, 2011 13:46
-
-
Save bueltge/1016758 to your computer and use it in GitHub Desktop.
Add Admin-User in WordPress via mySQL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INSERT INTO `databasename`.`wp_users` (`ID`, `user_login`, `user_pass`, `user_nicename`, `user_email`, `user_url`, `user_registered`, `user_activation_key`, `user_status`, `display_name`) VALUES ('99', 'my_login_name', MD5('my_password'), 'My Name', '[email protected]', '', '2011-06-09 00:00:00', '', '0', 'display_name'); | |
INSERT INTO `databasename`.`wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, '99', 'wp_capabilities', 'a:1:{s:13:"administrator";b:1;}'); | |
INSERT INTO `databasename`.`wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, '99', 'wp_user_level', '10'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think it's also helpful to note that if people use or alter the prefix in the WP-Config that they must change the wp_ to whatever their prefix is now. Otherwise none of this stuff is very useful to those who choose to insert a special prefix.