WordPress can assign different roles and actions to the users accessing the website. For instance, being an author, you can write and edit only the posts created by you. An editor can able to write and edit any of the available posts. Lastly, there is an admin who can do everything that you have on your WordPress website. Being an admin, one can add a new user anytime and assign any role on your WordPress website. In the upcoming article, let’s see how to add New WordPress Admin user in all possible ways.
Ways to Add a New WordPress Admin User
There are two possible ways to add a new admin user to your WordPress website and they are
- Add user from WordPress dashboard
- Add user via Database
How to Add a User From WordPress Dashboard
In order to create a new admin user from the dashboard, you need to be an Admin yourself to perform the action. If you are an admin then continue reading the article.
[1] Login to your WordPress dashboard. [2] From the left panel, click on Users. [3] Click on Add New under the expanded menu or in the main page next to User heading. [4] Here enter the Username and Email ID which is mandatory.Note: Other details can be filled or left blank which is not a problem at all.
[5] At last, choose Role as Administrator from the drop menu. [6] Once all required field is set, click on Add New User and your admin profile is created successfully.How to Add a User via Database: Method 1
[1] Go to hosting service cPanel and login to the PHPmyadmin under databases. [2] Inside the database, you need to make changes in wp_users and wp_usermeta databases. [3] First, click on wp_users and click on the Insert option. [4] Here fill the following section as described.- ID – pick any number (for example 5).
- user_login – enter the username for your profile.
- user_pass – enter a password for your profile and choose any encryption mode from the functions
- user_nickname – Enter any nickname if needed.
- user_email – Attach the email ID you need to link.
- user_url – enter the website URL.
- user_registered – select the date/time for when this user is registered.
- user_status – set this value to 0.
- display_name – here you can choose either username or nickname as your display name on the user dashboard.
- unmeta_id – This will be generated automatically so leave it blank.
- user_id – Enter the ID number you used in the ID column in wp_user
- meta_key – set to wp_capabilities
- meta_value – insert the following: a:1:{s:13:”administrator”;s:1:”1″;}
- unmeta_id – This will be generated automatically so leave it blank.
- user_id – Enter the ID number you used in the ID column in wp_user
- meta_key – set to wp_capabilities
- meta_value – Enter the values as 10
Note: Before making any change in the database or SQL make sure to backup your database in case if something goes wrong.
How to Add a User via Database: Method 2
If you are some basic knowledge of SQL then you can make this process even fast by enter the following SQL query in your SQL section on your PHPmyadmin page.
INSERT INTOdatabasename
.wp_users
(ID
,user_login
,user_pass
,user_nicename
,user_email
,user_url
,user_registered
,user_activation_key
,user_status
,display_name
) VALUES ('4', 'demo', MD5('demo'), 'Your Name', '[email protected]', 'http://www.test.com/', '2011-06-07 00:00:00', '', '0', 'Your Name'); INSERT INTOdatabasename
.wp_usermeta
(umeta_id
,user_id
,meta_key
,meta_value
) VALUES (NULL, '4', 'wp_capabilities', 'a:1:{s:13:"administrator";s:1:"1";}'); INSERT INTOdatabasename
.wp_usermeta
(umeta_id
,user_id
,meta_key
,meta_value
) VALUES (NULL, '4', 'wp_user_level', '10');
Note: Make sure to edit the data information according to your needs.
Read also: 10 Best WordPress Admin Themes & Plugins to Revive Your Dashboard
These are some of the possible ways to add new users to your WordPress. Creating a user from the WordPress dashboard is simple and straightforward. Use the database method only if your database got deleted or if you are stuck outside of your actual admin login. If you have any queries let us know in the comments section below.