Skip to content

Instantly share code, notes, and snippets.

@mrfoxtalbot
Created October 20, 2015 05:39
Show Gist options
  • Save mrfoxtalbot/9126c23eca83de8bcdd9 to your computer and use it in GitHub Desktop.
Save mrfoxtalbot/9126c23eca83de8bcdd9 to your computer and use it in GitHub Desktop.
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 ('4', 'demo', MD5('demo'), 'Your Name', '[email protected]', 'http://www.test.com/', '2011-06-07 00:00:00', '', '0', 'Your Name');
INSERT INTO `databasename`.`wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, '4', '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, '4', 'wp_user_level', '10');
unmeta_id – leave this blank (it will be auto-generated)
user_id – this will be the id of the user you created in the previous step. Remember we picked 4.
meta_key – this should be wp_capabilities
meta_value – insert this: a:1:{s:13:"administrator";s:1:"1";}
Insert another row with the following information:
unmeta_id – leave this blank (it will be auto-generated)
user_id – this will be the id of the user you created in the previous step. Remember we picked 4.
meta_key – this should be wp_user_level
meta_value – 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment