How to Add a New WordPress Admin User via phpMyAdmin

If you are locked out of your WordPress dashboard and cannot use the normal password-reset email, you can create a brand-new administrator account directly in the database using phpMyAdmin. This is the standard lockout-recovery method: it works even when you have lost the only admin login, when the reset email never arrives, or when a plugin or theme has broken the login form. Once the new admin exists, you sign in with it and repair the site from the dashboard as normal.

This guide is written for any WordPress site hosted with Noiz. You reach phpMyAdmin from your hosting control panel (Plesk on the South African platform, DirectAdmin on the Irish platform), or from the database manager in whatever panel your plan provides.

Last reviewed: 27 July 2026, against WordPress 6.8. This guide is written for Noiz hosting and is kept current against WordPress and phpMyAdmin. It complements, and does not replace, the official WordPress documentation linked below.

Does the MD5 trick still work on current WordPress? Yes. WordPress 6.8 changed the default password-hashing algorithm to bcrypt, but for backward compatibility WordPress still accepts a plain MD5 hash on login and silently upgrades it to the modern hash the first time the new user signs in successfully. That is why the phpMyAdmin method below continues to work on the latest releases.

Official Documentation Reference

Prerequisites

  • Access to phpMyAdmin for the site's database, through your Noiz hosting control panel.
  • The database name and the table prefix used by the WordPress install. Both are set in the site's wp-config.php file (look for DB_NAME and $table_prefix). The default prefix is wp_, but many installs use a custom prefix such as wpxy_ for security.

Important: throughout this guide the examples use the default wp_ prefix. If your install uses a different prefix, substitute it everywhere, including inside the meta_key values in the later steps. Using the literal text wp_ when your real prefix is different is the single most common reason this procedure fails.

Add the User to the wp_users Table

  1. Open phpMyAdmin.
  2. Select your database from the left-hand list (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.
  4. Click the Insert tab at the top of the phpMyAdmin menu.
  5. Fill in the new user data:
    • ID: enter any ID number that is not already used in the table, and note it down because you need it in the later steps. If you prefer, leave this field blank so MySQL auto-assigns the next value, then check the inserted row to see which ID it received.
    • user_login: the username this admin will log in with.
    • user_pass: the raw password the user will log in with. Critical: set the Function dropdown to the left of this field to MD5. If you skip this, phpMyAdmin stores your plain text instead of a hash and the password will never be accepted.
    • user_nicename: the author slug (for example your-name).
    • user_email: the email address for this user.
    • user_registered: set a valid date and time in the format 2026-07-22 09:00:00. Leaving this at the zero default can trip a strict MySQL mode and cause the insert to fail, so it is worth filling in.
    • user_status: set this to 0.
    • display_name: the name shown publicly (for example Your Name).
    You can leave the remaining fields (user_url, user_activation_key) blank.
  6. Click the Go button at the bottom of the page to insert the row.
  7. If phpMyAdmin shows a query confirmation page, click Go again. You should see a green success banner. A red error at the bottom means the user was not inserted; read the message (usually a duplicate ID or a missing required field) and correct it.

Add the wp_capabilities Row in wp_usermeta

This row is what actually gives the new account the administrator role. Without it, the login works but WordPress reports that you do not have permission to do anything.

  1. From the left-hand table list, click wp_usermeta.
  2. Click the Insert tab at the top of the phpMyAdmin menu.
  3. Fill in the following fields (leave umeta_id blank so it auto-assigns):
    • user_id: use the same ID you set in step 5 above.
    • meta_key: wp_capabilities. If your prefix is custom, this must be yourprefix_capabilities, not the literal wp_capabilities.
    • meta_value: a:1:{s:13:"administrator";b:1;}
  4. Click Go to insert the row, then Go again on any 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_key: wp_user_level (again, match your real prefix if it is not wp_).
    • meta_value: 10
  3. Click Go to insert the row, then Go again on any confirmation page. You should see a green success banner.

You should now be able to log in to your WordPress site at /wp-login.php with the new admin username and password.

After You Regain Access

  • Go to Users in the WordPress dashboard and open your new account, then set a fresh password from there. Doing this re-hashes the password with WordPress's modern algorithm and removes the temporary MD5 value.
  • If this account was only ever an emergency route in, delete it (or demote it) once the original login is working again.
  • Review why you were locked out in the first place: a broken plugin or theme, a corrupted .htaccess, or a compromised admin account are the usual causes.

Troubleshooting

  • The password is rejected at login: the Function dropdown was not set to MD5 when you inserted the row, so plain text was stored. Edit the wp_users row, re-enter the password, and set the function to MD5 before saving.
  • You can log in but see "You do not have sufficient permissions" or no admin menu: the meta_key values used the literal wp_ prefix instead of your real table prefix, or the wp_capabilities row is missing. Confirm your prefix in wp-config.php and check both wp_usermeta rows.
  • Red error when inserting into wp_users: most often a duplicate ID (the primary key already exists) or an empty required field such as user_registered. Read the error text and adjust the offending field.
  • The wp_capabilities value looks wrong after saving: the serialized string is length-sensitive. It must be exactly a:1:{s:13:"administrator";b:1;}, including the 13, which is the character count of the word administrator.

If you are still stuck, contact the Noiz support team and Noiz can do this for you. Please note that if you are not on a managed WordPress plan, this recovery work may be billable.

  • 1 Users Found This Useful
  • wordpress, database, password, login
Was this answer helpful?

Related Articles

How to Log In to the WordPress Dashboard

WordPress runs a large share of the web, and almost everything you do with it starts in the admin...

How to Remove Sample Posts, Pages and Comments From WordPress

Every fresh WordPress installation ships with a small set of placeholder items: one sample post,...

How to Write and Publish Your First Blog Post in WordPress

Writing your first blog post is one of the more satisfying moments in setting up a new website....

How to Delete a Post in WordPress

Removing a post in WordPress is a two-stage job, and most people only ever do the first stage....

How to Bulk Delete Posts in WordPress

Deleting posts one at a time is fine for a handful. When you are clearing out a demo site,...