How to reset WP administration user password using Linux command or config file using SFTP access?
Given that the password is stored in the database, you’re going to need to use a method that access the database.
I have an issue as password was defined as MD5 inside MYSQL but can not login.
I have the same problem, unfortunately it would be nice to solve it
Thanks amyjones329 you managed to solve this problem
If you’ve forgotten your WordPress admin password, you can reset it via email from the WordPress dashboard login page following these steps:
- Go to your WordPress login page (example.com/wp-admin)
- Click on Lost your password? at the bottom
- Enter the Username or E-mail of your WordPress admin user, then click on Get New Password
- You should get an email with the subject [WordPress Site] Password Reset. The body of this email will contain a link below the text To reset your password, visit the following address, go ahead and click on that link.
- Type in your new password, confirm it, then click on Reset Password
- Log into your WordPress account.
- In the dashboard, select Users > All Users.
- Hover over the user whose password you want to change and click Edit.
- Scroll down to the Account Management section and click the Set New Password button
Here are the steps to reset a WordPress administrator user password using Linux command and SFTP access:
- Connect to your website using SFTP.
- Navigate to the root directory of your WordPress installation.
- Open the wp-config.php file in a text editor.
- Add the following lines of code at the bottom of the file:
define( ‘WP_ALLOW_REPAIR’, true );
- Save the changes and close the file.
- Access the following URL in your browser: example.com/wp-admin/maint/repair.php (replace example.com with your domain name)
- Click on the “Repair Database” button.
- Once the repair is complete, you will see a message “Repair complete. Please remove the following line from wp-config.php to prevent this page from being used by unauthorized users.”
- Remove the line of code you added in step 4 from the wp-config.php file.
- Go to your website login page.
- Click on “Lost your password?” link
- Type in the email address associated with the admin account, and click “Get New Password”
- Check the email associated with the admin account for a link to reset the password
I have validated an issue. Folder permissions were modified due to PHP strict conditions with the current PHP settings It is solved now and login works without an issue.