Email This List Email This List Print This List Print This List

Add Word­Press users via MySQL

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’, ‘name’, MD5(‘password’), ‘Isaac Rayner’, ‘isaac.​rayner@​gmail.​com’, ‘http://​wiki​.onlin​enow​.co​.nz’, ‘2016−10−21 00:00:00′, ”, ‘0’, ‘Isaac Rayner’);
 
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’);
 
NOTE:
If you dont know your root MySQL pass­word, use this:
dpkg-recon­fig­ure mysql-server‑5.5

Related Post

admin has written 133 articles