The following are instructions to reset the passwords for a WordPress installation on a LAMP stack.
MySQL root user
- Open Terminal
- sudo mysql_secure_installation
- Enter current root password
- Validate password plugin: y
- Change root password: y
- Enter new root password
- Remove anonymous users: y
- Disallow root login remotely: y
- Remove test database: y
- Update privilege tables: y
phpmyadmin
- Open web browser
- Go to http://<host>/phpmyadmin
- Log in as user phpmyadmin
- Under General Settings, click on Change Password
- Enter new password, Click Go
- Log out and try with new password
MySQL wordpress user
- Open web browser
- Go to http://<host>/phpmyadmin
- Log in as user wordpress
- Under General Settings, click on Change Password
- Enter new password, Click Go
- Log out and try with new password
- Open Terminal
- sudo gedit /var/www/html/wordpress/wp-config.php
- Find /** MySQL database password */
- Change define(‘DB_PASSWORD’, ‘<password from step 5>’);
- Save file
Wordpress users
- Open web browser
- Go to http://<host>/wordpress/wp-login.php
- Log in as website administrator
- Go to Users
-
For each user
- Click on user
- Scroll to the bottom, look for New Password
- Click Generate Password
- Use generated password or enter new password
- Click Update Profile
- Log out and try with new password