How to recover lost WordPress admin password without access to email?

Mất password admin wordpress phải làm sao?

Losing or forgetting the admin password can be a common issue, but it can be easily solved by accessing hosting or asking for a reset from the provider. Two ways to regain admin rights include changing the password in MySQL or adding a new admin account using code in the function.php file. To change the password in MySQL, log in to the hosting management page, access the Database, find the wp_user table, and replace the encrypted password. The second method involves inserting code into function.php to create a new admin account. Remember to delete the code once admin rights are regained.

Losing or forgetting the admin password can be a hassle, but there are ways to regain access. If you still have access to your hosting, changing the admin password in MySQL is one straightforward method.

To do this, log in to your hosting management page and navigate to the MySQL section. From there, access your website’s Database and locate the wp_user table. Remember, some websites may use different prefixes, so choose the correct user table.

Find the admin account in the table and edit it. Look for the user_pass column, which stores the encrypted password. Replace the current value with the encrypted string for “admin”: $P$BN/Ukn4jQ4Xm0YDKT9h/I8YFrNdRZw0. This will reset the admin password to “admin” temporarily.

If accessing MySQL seems daunting, another option is to add a new admin account by inserting code into the function.php file. Modify the code snippet with your desired username, password, and email address. Once saved, log in with the new account and either change the password of the main admin or delete it.

See also  Hide Comment Dates on WordPress without Using a Plugin

Remember, after regaining admin rights, remove the added code from function.php. These methods offer simple solutions to regain admin access quickly. Good luck!

Rate this post

Related posts