How to Add New WordPress Logins via phpMyAdmin - DreamIT Host

Our Blog

How to Add New WordPress Logins via phpMyAdmin

Jun 23, 2021

How to Add New WordPress Logins via phpMyAdmin

Follow these steps to add new WordPress logins via phpMyAdmin:

First, you will need to find which database your website is utilising. To do this, you will need to access your wp-config file within your File Manager.

 

1. Log in to your cPanel account. For instructions on how to log in to cPanel, please click here.

Screenshot: cPanel Login Screen

 

2. Under the Files section, click File Manager.

Screenshot: Files Section of the Control Panel

 

3. Go to the location where your wp-config file is (most commonly stored in public_html with your other website files).

Screenshot: 'public_html' Folder

Screenshot: 'wp-config.php' File in the 'public_html' Folder

 

4. Once you have located your wp-config file, right-click the file, then click View.

Screenshot: Right-Click Drop-Down List for 'wp-config.php'

 

5. This will display the contents of the wp-config file. Look for the code that says: define( ‘DB_NAME’, ‘NameOfDatabase’ );

The database name will be noted where ‘NameOfDatabase’ is listed in the above code. In this example, the database name is ‘tofumomo_wp194’.

Screenshot: Contents of the 'wp-config' File

Now that you have the name of the database, you will need to access phpMyAdmin in your cPanel.

 

6. Under the Databases section, click phpMyAdmin.

Screenshot: Databases Section of the Control Panel

 

7. On the left-hand side panel, select the database that was listed in your wp-config file. (In this case, the database is ‘tofumomo_wp194’, as per the previous screenshots).

Screenshot: List of Databases on the Left-Hand Side Panel

 

8. Once you select the database, it will provide you with a list of tables. You need to locate the table that includes the list of users who can access your WordPress backend.

This table may have different names depending on how the website was built. In most cases, it will contain the word ‘users’ in the name. In this scenario, the table name you want to select is ‘wpa9_users’. This will open up a list of entries within the table ‘wpa9_users’.

Screenshot: List of Tables Highlighting 'wpa9_users'

 

9. At the top of the page, you will see a row of tabs, click the Insert tab. This will open up a page that allows you to insert new entries into the table.

Screenshot: Row of Tabs (Browse, Structure, SQL, Search, Insert, Export, Import, Operations, Triggers)

 

10. On this page, you can enter your new user login details.

Refer to the list below for each section that is required and what they are for.

  • user_login: Insert the username you want to use for your new admin user. (In our example, it is ‘example’.)
  • user_pass: Add a password for the account and select MD5 in the Function drop-down. (In this example, it is ‘ExamplePassword65’.)
  • user_email: Add the email address you want to use.
  • user_registered: Select the date and time for when this user should be registered.
  • user_status: Set this value to 0.

You can leave the ID row blank, the ID is a unique identifier and will be assigned automatically.

Screenshot: New WordPress Login Form

 

11. Once your new WordPress login entries have been filled out, click Go. This will take you to another page advising that the row/entry has been added.

Screenshot: Completed New WordPress Login Form

 

12. This will take you to another page advising that the row/entry has been added.

Screenshot: '1 row inserted. Inserted row id: 2'

 

13. Click back into the table name again ‘wpa9_users’.

 

14. Look for the new WordPress login entry. You will now need to note down the ID value. This is so we can link the permissions for the account. In this case, the ID is “2”.

Screenshot: List of WordPress Users

 

15. Back on the left-hand side panel, select the table that includes the word ‘usermeta’ in the name. In this scenario, the table name you want to select is ‘wpa9_usermeta’.

Screenshot: List of Tables on Left-Hand Side Panel Highlighting 'wpa9_usermeta'

 

16. This will list the entries within the table. Click the Insert tab at the top of the page.

Screenshot: Row of Tabs Highlighting 'Insert'

 

17. On this page, you can enter your new user login details.

Refer to the list below for each section that is required and what they are for.

  • user_id: Fill in the ID of the user you created in the previous step. (In this case, the ID was “2”.)
  • meta_key: The prefix of your table name followed by capabilities. By default, database tables usually start with wp_. However, in this case, the preluded text is wpa9_. Therefore, we would enter the text wpa9_capabilities.
  • meta_value: Fill in the field with a:1:{s:13:”administrator”;s:1:”1″;}

Screenshot: New User Login Details Form

 

18. Once these entries have been added, click Go.

Screenshot: Completed New User Login Details Form

 

19. This will take you to the next page to confirm the entries have been added to the table.

Screenshot: 1 row inserted. Inserted row id: 16

 

Congratulations! You can now log in using your new WordPress login 🙂

DreamIT Host
Leave a comment

Your email address will not be published. Required fields are marked *

#