As you can see from previous posts, phpMyAdmin is a powerful tool which every WordPress user and website owner should be familiar with. It enables you to perform complex operations without the need of learning to write SQL commands.

Knowing your way around the database administration tool can make running your website a lot of easier. Save you a lot of nerve and gooling in case of a crisis.

In this article, we will show you a step by step guide on how to create an admin user in WordPress Database via phpMyAdmin. (Note: You should always make a backup of your database before performing any MySQL edits. This tutorial requires basic understanding of how phpMyAdmin works.

Add an Admin User

  1. First, you need to login to phpMyAdmin and locate your WordPress database. Go to cPanel > File section > File Manager menu. Find the wp-config.php file. Right-click on the file and select View or Edit option :
    Add an Admin UserYou will see the database name in this line:
  2.  Go to phpMyAdmin menu in the Databases section. Click on the name of your database to expand the list of the tables and select wp_users table:
  3. Go to the Insert tab:
    Fill in the following information:
    ID: select any number you wish to assign to the user
    user_login: username you want to use
    user_pass: password for this user to access WordPress admin dashboard. You need to select MD5 from the drop-down menu in the Function column
    user_nicename: you can set a nickname here
    user_email: contact email of the new user
    user_url: your website url
    user_registered: date and time for when this user is registered
    user_status: set this to 0
    display_name: name, that will be displayed on the website
    Once all the fields are filled in, click the Go button
  4. Now, go to the wp_usermeta table. And go to Insert tab
    In the first form, fill in the following information:unmeta_id: leave this blank (it will be auto-generated)
    user_id: ID you used for the user while adding it to wp_users table
    meta_key: set it to wp_capabilities
    meta_value: put the following:
    a:1:{s:13:”administrator”;s:1:”1″;}Fill the form below with the following details:
    unmeta_id: leave this blank (it will be auto-generated)
    user_id: ID you used for the user while adding it to wp_users table
    meta_key: input following -> wp_users table
    meta_value: insert following -> 10

Once all the fields are filled in, click the Go button at the bottom.

Now, you can access your WordPress admin dashboard using these new user details.

click here to continue >>