Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

wordpress database add admin

INSERT INTO `databasename`.`wp_users` (`user_login`, `user_pass`, `user_nicename`, `user_email`, `user_url`, `user_registered`, `user_activation_key`, `user_status`, `display_name`) VALUES ('username', MD5('password'), 'name', 'test@domain.com', 'http://www.test.com/', '2011-06-07 00:00:00', '', '0', 'Your Name');

# Select user ID and insert into XXX

INSERT INTO `databasename`.`wp_usermeta` (`user_id`, `meta_key`, `meta_value`) VALUES ('userid', 'wp_capabilities', 'a:1:{s:13:"administrator";s:1:"1";}');
 
INSERT INTO `databasename`.`wp_usermeta` (`user_id`, `meta_key`, `meta_value`) VALUES ('userid', 'wp_user_level', '10');
Source by www.wpbeginner.com #
 
PREVIOUS NEXT
Tagged: #wordpress #database #add #admin
ADD COMMENT
Topic
Name
4+8 =