If you need to quickly create an admin account for a WordPress site, upload adminer.php to the root directory or log in to phpMyAdmin, and run this SQL command (SQL tab in phpMyAdmin):

INSERT INTO `DATABASE_NAME`.`wp_users` (`ID`, `user_login`, `user_pass`, `user_nicename`, `user_email`, `user_url`, `user_registered`, `user_activation_key`, `user_status`, `display_name`)
 VALUES ('99999', 'username', MD5('MakeABetterPassword'), 'username', 'email@gmail.com', '', NOW(), '', '0', 'Display Name');
INSERT INTO `DATABASE_NAME`.`wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`)
 VALUES (NULL, '99999', 'wp_capabilities', 'a:1:{s:13:"administrator";b:1;}');
INSERT INTO `DATABASE_NAME`.`wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`)
 VALUES (NULL, '99999', 'nickname', 'username');

Of course replace all the data with your own.

Leave a Reply

Your email address will not be published. Required fields are marked *