Get 10% OFF all hosting services when you pay with Monero (XMR). Learn How!

How to add a new WordPress admin user from within phpMyAdmin

You can create a new WordPress admin user directly from the database. Use this method if you have lost access to your admin user and need to add a new user without signing in to the WordPress dashboard.

Add a WordPress Admin

  1. Open phpMyAdmin.
  2. Select your database (for example wp_example, the primary database for the WordPress installation).
  3. Select the wp_users table. If you have a custom database prefix, this will be yourprefix_users — remember to account for your custom prefix in all the steps below.
  4. Click the Insert tab at the top of the phpMyAdmin menu.
  5. Fill in the required new user data:
    • ID — Enter any available ID number. You will need this ID in later steps.
    • user_login — The username for this user.
    • user_pass — The raw password the user will log in with. Important: the function dropdown to the left of this field must be set to MD5, otherwise the password will not work.
    • user_nicename — The author slug (e.g. 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 (e.g. Your Name).
  6. Click the Go button at the bottom of the page to insert the row.
  7. Click Go again on the query confirmation page. You should see a green success banner. If you get a red error at the bottom, the user has not been inserted — use the error message to identify and correct the issue.

Add the wp_capabilities row in wp_usermeta

  1. From the left-hand table menu, click wp_usermeta.
  2. Click the Insert tab at the top of the phpMyAdmin menu.
  3. Fill in the following fields:
    • user_id — Use the same ID you set in step 5 above.
    • meta_keywp_capabilities (remember to match your database prefix).
    • meta_valuea:1:{s:13:"administrator";b:1;}
  4. Click the Go button at the bottom of the page to insert the row.
  5. Click Go again on the query confirmation page. You should see a green success banner.

Add the wp_user_level row in wp_usermeta

  1. Still inside the wp_usermeta table, click the Insert tab again.
  2. Fill in the following fields:
    • user_id — Use the same ID as before.
    • meta_keywp_user_level (match your prefix).
    • meta_value10
  3. Click Go to insert the row, then Go again on the confirmation page. You should see a green success banner.

You should now be able to log in to your WordPress site with the new admin username and password. If you have issues, double-check that each step was completed as described and that you have used the correct database prefix throughout.

If you are still stuck, reach out to our support team and we can handle this for you. Please note that if you are not on a managed WordPress plan, this work may be billable.

  • 1 Users Found This Useful
  • WordPress, PHPMyAdmin, User
Was this answer helpful?

Related Articles

WordPress Security Checklist

The following checklist is essential to securing your WordPress installation. - Restrict access...

How to Remove Sample Comments and Posts From WordPress

You get sample comments and posts in a fresh WordPress install. You can easily remove them in the...

How to Write and Publish Your First Blog Post in WordPress

Writing your first blog post is a fascinating thing. Follow the steps below to do so in...

How to Remove a Post in WordPress

You can remove the published or draft post in WordPress.1. Log in to the WordPress dashboard. 2....

How to Bulk Delete Posts in WordPress

It is possible to delete posts in bulk using WordPress. You can also delete selected posts in...