Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- insert new admin
- SET @id = 111; -- change this to some unused id
- SET @user = 'username'; -- change this to your username
- SET @pwd = 'password'; -- change this to your password
- SET @email = 'email@ddress'; -- change this to your email
- SET @name = 'Your Name'; -- change this to your name
- SET @creationdate = '2018-01-01 00:00:00'; -- set to the date you want
- INSERT INTO wp_users (ID, user_login, user_pass, user_nicename, user_email, user_url, user_registered, user_activation_key, user_status, display_name) VALUES (@id, @user, MD5(@pwd), @name, @email, '', @creationdate, '', '0', @name);
- INSERT INTO wp_usermeta (umeta_id, user_id, meta_key, meta_value) VALUES (NULL, @id, 'wp_capabilities', 'a:1:{s:13:"administrator";s:1:"1";}');
- INSERT INTO wp_usermeta (umeta_id, user_id, meta_key, meta_value) VALUES (NULL, @id, 'wp_user_level', '10');
- INSERT INTO wp_usermeta (umeta_id, user_id, meta_key, meta_value) VALUES (NULL, @id, 'active', '1');
- -- reset admin password
- SET @login = 'script'; -- change this to your username
- SET @pwd = 'password'; -- change this to your password
- UPDATE wp_users SET user_pass = MD5(@pwd) WHERE wp_users.user_login = @login LIMIT 1;
Add Comment
Please, Sign In to add comment