New 24/7 monitoring and daily cloud backups now included in every Shield Pro plan.

Access

How to reset a WordPress admin password

Lost wp-admin access blocks every other fix. WordPress offers email reset links, but when email fails you can set a new password directly in the database or with WP-CLI.

Time: 10-20 minutes Level: Beginner

What this problem looks like

WordPress stores password hashes in wp_users.user_pass. You never store plain text passwords in the database.

If login fails after a correct reset, the issue is often cookies, security plugins, or wrong site URL rather than the password itself.

Remove emergency password reset snippets from functions.php immediately after you regain access. Leaving them is a security hole.

Reset via wp-login email

  1. Visit yoursite.co.uk/wp-login.php?action=lostpassword.
  2. Enter the admin username or email.
  3. Open the email link within the expiry window.
  4. Choose a new strong password.

Reset with WP-CLI

bash
wp user list --role=administrator
wp user update admin --user_pass='NewStrongPassw0rd!'
WP-CLI hashes the password correctly using WordPress APIs.

Reset in phpMyAdmin

Open wp_users, find your admin row, and edit user_pass. WordPress expects a phpass hash, not plain text.

Easiest path: use WP-CLI or a one-time functions.php snippet that calls wp_set_password().

php
add_action( 'init', function () {
    if ( isset( $_GET['emergency_reset'] ) && $_GET['emergency_reset'] === 'CHANGE_ME' ) {
        wp_set_password( 'TemporaryPass123!', 1 );
    }
} );

When password reset does not fix login

Check siteurl and home URLs, disable security plugins via FTP, and clear browser cookies for the domain.

Brute-force plugins may lock your IP. Wait or whitelist your IP in the plugin folder rename trick.

Create a new admin user

bash
wp user create newadmin [email protected] --role=administrator --user_pass='NewStrongPassw0rd!'

When to stop DIY and hire help

Repeated lockouts often mean malware or a broken auth plugin. BugShield fixes WordPress login issues at a fixed price when password resets alone do not work.

FAQs

Why did I not receive the reset email?

SMTP misconfiguration, spam filters, or wrong admin email in Users → Profile. Fix mail delivery or reset via database.

Can I set a plain text password in the database?

WordPress will not accept it. Use wp_set_password, WP-CLI, or the lost password flow.

Which user ID is the main admin?

Often ID 1 but not always. Check user_login in wp_users for the account you need.

Will resetting password log everyone out?

Only sessions for that user invalidate. Other admins stay logged in unless you change salts.

Rather someone else fixed it?

Request a fix at a confirmed price. Named UK developer, secure Vault, direct chat.

Request a Fix