Add user admin wordpress via Mysql

Overcoming Obstacles like you can not log into your wordpress admin user, usually caused due to an error code, the Hack Attack remove and replace ente.atau admin user can also be caused by an admin error that inadvertently may change the admin as administrator demotion be editors, so access was limited and not full edit.

If such obstacles occur, how to solve it? Yak solution is to create a new admin but through your Mysql database. Here are the steps;


1. Go to cpanel web

2. Click on the icon with the title phpMyAdmin

3. Click the name of the SQL database you are using

4. If it is click the tab with the title SQL

5.Isikan the following code into SQL ente column. and replace the red text by name admin and your password
INSERT INTO `wp_users` (`user_login`, `user_pass`, `user_nicename`, `user_email`, `user_status`)
VALUES ('newadmin', MD5('pass123'), 'firstname lastname', 'email@example.com', '0');

INSERT INTO `wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) 
VALUES (NULL, (Select max(id) FROM wp_users), 'wp_capabilities', 'a:1:{s:13:"administrator";s:1:"1";}');

INSERT INTO `wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) 
VALUES (NULL, (Select max(id) FROM wp_users), 'wp_user_level', '10');

6. After you fill in and change the red text corresponding ente want then click the Go button



7. Done new admin user has been created and the Ente could try to login :)

0 Response to "Add user admin wordpress via Mysql"

Post a Comment

Back to top