Search
Close this search box.

Update Wordress Admin Password in Btinami using SSH

How to Retrieve and Update WordPress Admin Password using SSH for Bitnami

How to Retrieve and Update WordPress Admin Password using SSH for Bitnami

Bitnami simplifies the process of deploying applications such as WordPress on cloud platforms. However, there may be times when you need to retrieve or update your WordPress admin password via SSH. Here’s a step-by-step guide to help you do just that.

Step 1: Get Bitnami Application Password

First, you need to obtain the default password set by Bitnami for your application. This password is stored in a file on your server. Connect to your server using SSH and run the following command:

cat ~/bitnami_application_password

This will display the password, which you can use to access your Bitnami application.

Step 2: Log in to MySQL

To manage your WordPress users, you need to log in to the MySQL database. Use the following command to log in:

sudo /opt/bitnami/mysql/bin/mysql -u root -p

You will be prompted to enter the MySQL root password. This password is typically the same as the Bitnami application password you retrieved in Step 1.

Step 3: List All Admin Users

Once you are logged into MySQL, you can list all admin users in your WordPress installation by executing the following SQL query:

SELECT u.ID, u.user_login, u.user_email
FROM wp_users u
JOIN wp_usermeta um ON u.ID = um.user_id
WHERE um.meta_key = 'wp_capabilities' AND um.meta_value LIKE '%"administrator"%';

This query will return a list of all admin users, including their user IDs, login names, and email addresses.

Step 4: Update Admin Password

If you need to update the password for a specific admin user, use the following SQL command. Replace Password@2024 with your desired new password and rasadm with the username of the admin whose password you want to change:

UPDATE wp_users SET user_pass=MD5('Password@2024') WHERE user_login='rasadm';

This command will update the password for the specified user. Make sure to use a strong and secure password.

Conclusion

By following these steps, you can easily retrieve and update your WordPress admin password using SSH for Bitnami. This is particularly useful if you have lost access to your WordPress admin dashboard or need to update the password for security reasons. Always remember to use secure passwords and update them regularly to protect your website.

Web Manager

Leave a Replay

Sign up for our Newsletter

Sign up for our newsletter and stay in the loop with exclusive offers, trending news, and valuable insights delivered straight to your inbox!