There are several ways to reset a forgotten WordPress password.
Via the link “Forgot your password?”
Instructions for beginners
If you know the username and email address defined in your WordPress profile, you can create a new password.
- Click “Forgot your password?” on the page where you log in to WordPress administration (yourdomain.com/wp-admin).
- Enter your username or the email address you defined in your profile
- A verification link is sent to your email address to reset your old password
- After clicking the verification link, your old password is reset and you can choose a new one
- After you confirm the password change, you simply log in to the content management system administration with your new password
Via FTP Access
Instructions for beginners
There’s also an easy way to change your password via FTP if you’re an administrator.
- Log in to your website via FTP and download the features.php file in your active theme
- Edit the file and add this code right at the beginning after the first <? Php:
wp_set_password('password',1);
- Enter your own new password for the main administrator. “1” is the user ID number in the wp_users table
- Upload the modified file back to your site
- After you log in, you must go back and remove the code. If you don’t, your password will change every time the page loads
Via phpMyAdmin
For experienced users
If you have access to the database used by WordPress, you can change the password or login name directly in the MySQL tables in the database via phpMyAdmin.
- Log in to phpMyAdmin
- Select the WordPress database (if you don’t know which one you use, you’ll find it defined in the wp-config.php file on your host)
- All database tables are displayed and select “wp_users”. Click “Browse”
- A list of users defined in the wp_users table is displayed
- Via the “checkbox” we mark the user we want to edit and click “Change”
- On the “user_pass” row, set the MD5 function in the “Function” column and enter a new password in the “Value” column. Finally click “Execute”
After a successful change, we can log in with a new password at:
example.se/wp-login.php
If, despite the procedures mentioned above, you cannot reset the password, this official guide will help you directly from WordPress: https://wordpress.org/support/article/resetting-your-password/