• Things I Got Useful

  • Reset Users into a WordPress Database

    Reset User Password

    UPDATE `wp_users` SET `user_pass` = MD5( 'new_password' ) WHERE `wp_users`.`user_login` = "admin_username";

    Create New Admin User

    INSERT INTO 'wp_users' ('user_pass','user_login','user_nicename','user_email','user_registered','users_status','display_name') VALUES MD5('password','adminuser','adminuser','adminuser@adminuser.com',now(),0,'adminuser');
    
    INSERT INTO wp_usermeta (user_id,meta_key,meta_value) VALUES ((select ID from wp_users order by ID desc limit 1), "wp_user_level0", "10")
    
    INSERT INTO wp_usermeta (user_id,meta_key,meta_value) VALUES ((select ID from wp_users order by ID desc limit 1), "wp_capabilities", "a:1:{s:13:\"administrator\";b:1;}")
    
    INSERT INTO wp_usermeta (user_id,meta_key,meta_value) VALUES ((select ID from wp_users order by ID desc limit 1), "wp_user_level", "10")
    
    

    Leave a Reply

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