leglesslizard
4/28/2016 - 11:06 PM

Add new admin user to wordpress database with credentials u: admin, p: password

Add new admin user to wordpress database with credentials u: admin, p: password

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 ('99999', 'admin', MD5('password'), 'admin', 'admin@local.com', '', '2011-06-07 00:00:00', '', '0', 'admin');
INSERT INTO `databasename`.`wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, '99999', 'wp_capabilities', 'a:1:{s:13:"administrator";s:1:"1";}');
INSERT INTO `databasename`.`wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, '99999', 'wp_user_level', '10');