GICT knowledge base
Reset a WordPress Password in the Database as a Last Resort
Published
Direct database password recovery is a last resort for an authorized WordPress owner or administrator. Prefer the normal reset link or an authorized WordPress/WP-CLI operation. A database edit can target the wrong site or user and does not repair a compromised installation.
Identify the correct database and account
Keep an appropriate protected database backup and a recovery plan. Confirm the actual database and table prefix from the installation’s configuration without exposing its database credentials. Do not assume the database name begins with wp, that the users table uses the default prefix, or that the administrator has ID 1. In multisite, identify the shared user table and intended site context deliberately.
phpMyAdmin recovery
- Open the trusted database-management interface through your hosting account. This requires suitable access; phpMyAdmin does not make the operation risk-free.
- Select the confirmed database and actual users table. Locate the exact account using its ID/login and inspect the selected row before editing.
- For the legacy-compatible recovery method documented by WordPress, edit only user_pass, select the MD5 function and enter a unique temporary recovery password. Do not enter plaintext without the required function, and do not change every user row.
- Save the one intended row. Test WordPress login privately and complete any applicable account recovery checks.
WordPress documents this as a compatibility route: its normal login can replace the temporary MD5 value with a stronger hash. MD5 is not the recommended ongoing password-storage scheme. Authentication plugins or an external identity provider can change the behavior, so do not assume the core workflow applies to every installation.
After access is restored
Use WordPress account settings to set a strong unique password and review active sessions/application passwords as appropriate. If the account email was changed maliciously, investigate that incident instead of assuming a password reset removes the attacker.
Do not submit passwords or database dumps to public hash generators or ordinary support messages. The old inline-password SQL examples and generic root database login shortcut have been withdrawn; they exposed secrets and made wrong-scope edits too easy.
References: WordPress’s documented database recovery limits; current WordPress password hashing.
Reviewed October 15, 2026. No customer database row or login was modified; plugin-specific recovery was not tested.
Related guides
7 Common Hosting Mistakes Beginners Make (And How to Avoid Them)
7 common hosting mistakes beginners make in 2026: no backups, ignored updates, bad host choice, weak passwords, single point of failure, no staging. With fixes for each.
WordPressWebsite Migration Backup Checklist: What to Save and How to Test
Prepare a website migration backup: inventory files, databases, email and DNS, check archive integrity, test recovery and plan a safe final synchronization.
WordPressCore Web Vitals in 2026: A Practical Fix Guide for Site Owners
Core Web Vitals 2026: practical fixes for LCP, INP, and CLS. Real root causes, what to measure, common misconceptions, and a priority order of fixes for site owners.
WordPressFixing the WordPress “Death Loop”: When Missing Files slow down your site
You’ve just launched your new WordPress site or pushed a big update. In your staging environment, everything ran perfectly.
