How to Reset WordPress Admin Password via cPanel?


If you have forgotten your WordPress admin password and cannot receive the reset email, you can reset it directly through phpMyAdmin in cPanel. This method bypasses the need for email access.

Steps to Reset WordPress Password via phpMyAdmin

  1. Login to cPanel.
  2. Under Databases, click phpMyAdmin.
  3. Select your WordPress database from the left panel.
  4. Click on the wp_users table (the prefix may differ, e.g., wp123_users).
  5. Find your admin user and click Edit.
  6. Locate the user_pass field.
  7. In the Function column for user_pass, select MD5 from the dropdown.
  8. In the Value column, type your new password.
  9. Click Go to save.

Your WordPress admin password is now reset. Login to yourdomain.com/wp-admin with the new password.

Alternative: Reset via WP-CLI (SSH)

wp user update admin --user_pass=YourNewPassword123

Alternative: Add Emergency Reset Code to functions.php

Add this code temporarily to your theme's functions.php file, then visit your website once and remove it:

wp_set_password('YourNewPassword', 1);

Note: The number 1 in the above code is the WordPress user ID. Change it to match your admin user ID if needed (visible in the wp_users table).

If you continue to face issues, please open a create a request.

Esta resposta foi útil? 0 Os usuários acharam isso útil (0 Votos)