cp-lockdown > WordPress


The following are instructions to reset the passwords for a WordPress installation on a LAMP stack.

MySQL root user

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