PDA

View Full Version : How to add a new Wordpress Admininstrator user using phpMyAdmin?



Mywebbee
05-07-2018, 07:36 AM
You can create a new database administrator user in wordpress sites using phpMyadmin by issuing the following three Database Queries.

After running these queries, you can login to your worpress admin with the following login details.
UserName: admin1
Password: admin1


Query1:

INSERT INTO `databasename`.`wp_users` (`ID`, `user_login`, `user_pass`, `user_nicename`, `user_email`, `user_url`, `user_registered`, `user_activation_key`, `user_status`, `display_name`)
VALUES ('4', 'admin1', MD5('admin1'), 'Admin', 'admin@yourdomain.com', 'http://www.yourdomain.com/', '2012-12-30 00:00:00', '', '0', 'Admin');

Query2:

INSERT INTO `databasename`.`wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`)
VALUES (NULL, '4', 'wp_capabilities', 'a:1:{s:13:"administrator";b:1;}');

Query3:

INSERT INTO `databasename`.`wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`)
VALUES (NULL, '4', 'wp_user_level', '10');


Note:- Please don't forget to change the 'databasename' with the database you are working with.
Please read through all the fields in the tables and change the values as you wish.

ecozaar
05-16-2018, 12:51 AM
Here are the steps you will need to follow to give your user privileges.
Click on the wp_usermeta table to bring up the entries.
Click on the “Insert” tab to insert a new row.
Fill in the following information. ...
Insert another row with this information. ...
Click the “Go” button in phpMyAdmin to insert the row.

dilipcybex
05-16-2018, 03:14 AM
Why can't we just add it through dashboard ? Again, it is not good to have more than one administrator. Better give the option as an editor to other users.

sanjalisharma89
05-26-2018, 06:07 AM
To begin, log into your cPanel interface
From the main cPanel screen, find the Databases category and click on the icon entitled phpMyAdmin
Once the first screen appears, look to the left hand sidebar and click on the database for your specific WordPress installation. If you do not know which database is the correct one, you can find out by using these instructions
After the database information loads, you will need to find the tab named SQL and click on it
This leads you to an SQL editor where you will enter some code that will create a new admin account for you
After replacing any data fields you need, click the Go button to perform the insertion
This should simply refresh the screen and you should see the messsage '1 row affected' after each of the three SQL statements. This means the insertion ran smoothly. From here, visit your wordpress admin login area as normal and use the new admin login information. You should get to the admin interface without issue

BeZazz-TheRaj
05-27-2018, 11:32 PM
why do you want to do this ? just go to Admin panel and add a new Admin its simple