Prerequisite: Have access to the DB (mariaDb or Mysql)
In this video we will learn how to access the Wordpress website (wp-admin) using new credentials, when we do not remember what username and password we had configured during the first installation. We will create the new user through the Wordpress database. Go for it!
⏰ TIMESTAMPS:
Solve Wordpress Access problem (0:00)
Solution by Phpmyadmin (1:10)
Command Line Solution (Shell) (2:37)
✍ Command:
INSERT INTO wp_users (user_login, user_pass, user_email, user_registered, display_name)
VALUES ('new-user', MD5('new-password'), 'e-mail', NOW(), 'New-user-Description');
INSERT INTO wp_usermeta (user_id, meta_key, meta_value)
VALUES (LAST_INSERT_ID(), 'wp_capabilities', 'a:1:{s:13:"administrator";s:1:"1";}');
INSERT INTO wp_usermeta (user_id, meta_key, meta_value)
VALUES (LAST_INSERT_ID(), 'wp_user_level', '10');