Add WordPress Admin User with phpMyAdmin

You can create a new WordPress admin user directly from the database. Use this method if you need to add a new user to the site without having to sign in to the WordPress dashboard.


Add WordPress Admin

  1. Open the User Portal to the Sites page
  2. Select the Environment name to edit
  3. Click phpMyAdmin at the top
  1. Select your database
    • wp_environment — Primary database for this environment
  2. Select the wp_users table
    • If you have a custom database prefix this will instead be yourprefix_users. Be sure to take this into account in later steps as well.
  3. Click Insert at the top
  4. Fill out the required new user data
    • ID — Enter any available ID number. You’ll need to know this ID number later!
    • user_login — The username for this user.
    • user_pass — The raw password the user will login with.
      • NOTE: The function dropdown to the left must be set to MD5 or the password WILL NOT WORK.
    • user_nicename — The author slug or name (EX: your-name).
    • user_email — The email address associated with this user.
    • user_status — Set this to 0
    • display_name — The display name for the user (EX: Your Name)
  5. Click Go at the bottom
  6. Click Go again on the query page
    • You should get a green check mark and success banner.
    • If you get a red error at the bottom the user has not been inserted. Follow the error message to correct the issue until you are successful.
  7. On the left hand menu click wp_usermeta
  8. Click Insert at the top
  9. Fill out the following required fields for user capabilities:
    • user_id — Same ID from Step 8
    • meta_keywp_capabilities
    • meta_valuea:1:{s:13:"administrator";b:1;}
  10. Click Go at the bottom
  11. Click Go again on the query
    • You should get a green check mark and success banner.
    • If you get a red error at the bottom the user has not be inserted. Follow the error message to correct the issue until you get a success.
  12. Click Insert at the top again
    • user_id – Same ID from step 8
    • meta_keywp_user_level
    • meta_value10
  13. Click Go at the bottom

You should now be able to access the site with your new admin user. If you have issues recheck that each step is done exactly as described.

If you have a custom database prefix, ensure you’ve done each step in the respective custom prefix table name.


Additional Notes

If your newly created user is unable to use the visual editor within WordPress after creation, ensure the visual editor is not disabled. This can be set in two ways:

From the admin dashboard:

  1. Login to the WordPress admin dashboard with your new user
  2. At the top right, click your username
  3. Click Edit my profile
  4. Ensure Disable the visual editor when writing is not checked

Or, from the database:

  1. Open the usermeta database table
  2. Click Insert
    1. user_id – Same ID from step 8 previously
    2. rich_editingtrue
  3. Click Go

NEXT STEP: Read about User Portal Roles

Still need help? Contact support!

We offer support 24 hours a day, 7 days a week, 365 days a year. Log in to your account to get expert one-on-one help.

The best in WordPress hosting.

See why more customers prefer WP Engine over the competition.