Resetting WordPress Admin User via HeidiSQL

Download and install HeidiSQL (should also work with any of your favorite MySQL clients)

Connect to your database and use these queries in the query panel

select * from wp_users
UPDATE wp_users SET user_pass=MD5('123456') WHERE user_login='me';

Don't have an admin user account do this instead to create a new one:

INSERT INTO `wp_users` (`ID`, `user_login`, `user_pass`, `user_nicename`, `user_email`, `user_status`, `display_name`) VALUES ('1000', 'adminusername', MD5('YourSecurePassword'), 'adminusername', 'youremail@email.com', '0', 'Your Name');

INSERT INTO wp_users (ID, user_login, user_pass, user_nicename, user_email, user_status, display_name) VALUES ('1000', 'omgadmin', MD5('Indiana99%'), 'tempuser', 'alan.son@omnicommediagroup.com', '0', 'OMG Admin');

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');

🚀 **Support Our DevOps Blog with Your Amazon Shopping!** 🚀 Love shopping on Amazon? Now you can fuel your shopping spree *and* support our blog at no extra cost! Just use our link for your next purchase: **[Shop on Amazon & Support Us!] Browse Stuff on Amazon Every click helps us keep sharing the DevOps love. Happy shopping!

Leave a Comment