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
- WordPress: Resetting Your Password (see the phpMyAdmin section)
- WordPress: Database Description (the
wp_usersandwp_usermetatables) - phpMyAdmin documentation
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.phpfile (look forDB_NAMEand$table_prefix). The default prefix iswp_, but many installs use a custom prefix such aswpxy_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
- Open phpMyAdmin.
- Select your database from the left-hand list (for example wp_example, the primary database for the WordPress installation).
- Select the wp_users table. If you have a custom database prefix, this will be yourprefix_users.
- Click the Insert tab at the top of the phpMyAdmin menu.
- 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).
user_url,user_activation_key) blank. - Click the Go button at the bottom of the page to insert the row.
- 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.
- From the left-hand table list, click wp_usermeta.
- Click the Insert tab at the top of the phpMyAdmin menu.
- 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 beyourprefix_capabilities, not the literalwp_capabilities. - meta_value:
a:1:{s:13:"administrator";b:1;}
- 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
- Still inside the wp_usermeta table, click the Insert tab again.
- 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 notwp_). - meta_value:
10
- 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_usersrow, 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_keyvalues used the literalwp_prefix instead of your real table prefix, or thewp_capabilitiesrow is missing. Confirm your prefix inwp-config.phpand check bothwp_usermetarows. - 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 the13, which is the character count of the wordadministrator.
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.
