BE SMART, hand over your headache to Rootways and FOCUS ON YOUR BUSINESS.

How to Add an Admin User to the WordPress Database via MySQL (phpmyadmin)

How to Add an Admin User to the WordPress Database via MySQL (phpmyadmin)
Posted in: WordPress

How to Add an Admin User to the WordPress Database via MySQL (phpmyadmin)

Note: You should always take a backup of your website database before performing any MySQL (phpmyadmin) edits.

Please do some required modification in below query and execute following queries in your MYSQL

Before query execution please replace your database prefix and ID (Use max ID from your wp_users table)

INSERT INTO `database_prefix_users` (`ID`, `user_login`, `user_pass`, `user_nicename`, `user_email`, `user_url`, `user_registered`, `user_activation_key`, `user_status`, `display_name`) VALUES ('2', 'Root', MD5('[email protected]'), 'Your Name', '[email protected]', 'http://www.yourwebsite.com/', '2020-08-21 00:00:00', '', '0', 'Your Name');

INSERT INTO `database_prefix_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, '2', 'database_prefix_capabilities', 'a:1:{s:13:"administrator";s:1:"1";}');

INSERT INTO `database_prefix_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, '2', 'wp_user_level', '10');

After the successful query execution Please try to login with below login detail

First open your WordPress admin login screen

Username: Root
Password: [email protected]

For more WordPress Services contact us

 

August 21, 2020
Did you like this post?
0
0