How to Reset a WordPress Admin Password

Web Hosting in Pakistan

This article describes how to manually reset the WordPress administrator password in the database. Normally if you forget your password, you can use the WordPress password recovery feature to reset the password by e-mail. However, if this option is unavailable (for example, if e-mail on your site is not working correctly) you can reset the password in the database manually.


RESETTING THE ADMINISTRATOR PASSWORD IN THE DATABASE

To manually reset the WordPress administrator password in the database, follow these steps:

  1. Log in to cPanel.
  2. In the Databases section of the cPanel home screen, click phpMyAdmin.
  3. In the left-hand pane of phpMyAdmin, click the WordPress database. A list of tables in the database appears.

Note: Typically, the WordPress database is username_wpXXX, where usernamerepresents your cPanel username, and XXX is a three-digit number.

 

  1. On the top menu bar, click SQL.
  2. Copy and paste the following statement into the SQL query text box. Replace new_password with the new password, and replace admin_username with the administrator's username.

    UPDATE `wp_users` SET `user_pass` = MD5( 'new_password' ) WHERE `wp_users`.`user_login` = "admin_username";

    • This SQL statement creates an MD5 hash of the password you specify. WordPress requires that passwords are stored in the database in this format. If you try to update the password field directly with the new password, you will be unable to log in to WordPress.
    • Some versions of WordPress use the table name wp_users, while other versions use a different name (for example, wpe6_users). If your WordPress version uses a table name different from the one in the above statement, use it instead.
  3. Click Go. phpMyAdmin updates the database with the new password.
  4. You should now be able to log in to WordPress as the administrator by using the new password.

 

Was this answer helpful?

 Print this Article

Also Read

How to optimize the Wordfence Security plugin for WordPress

This article describes how to optimize the Wordfence Security plugin for a WordPress installation...

How to Optimize WordPress using W3 Total Cache and GTmetrix

As your site gains traffic and users, and as you add additional content, your site may begin to...

How to optimize WordPress trash settings

This article describes how to optimize the trash settings in WordPress. ABOUT THE WORDPRESS...

How to Add a Custom Logo to WordPress

This article describes how to add a custom logo to a WordPress site. Adding a logo to your...

How to Send Emails Using WordPress

This article describes how to configure WordPress to send e-mails on hosting servers. WordPress...

Web Hosting in Pakistan

Powered by WHMCompleteSolution