Wordpress Administration Password Forgotten

Keywords: WordPress Multisite - Google Cloud Platform - How to - Other
Description:
Dear Expertise,

With very less knowledge of LINUX, I am using GCP SSH following tutorials to solve some issues.

My GCP Instance had an issue therefore the username and password do not show in the instances page. Therefore, External IP address can only be retrieved from Compute Engine > VM Instances.

Here, the username and password is not provided. Therefore, I am unable to login to the Wordpress site.

Kindly help me to reset the Wordpress Password.

Configurations:

  1. GCP Wordpress Multisite
  2. MySQL v 8+

Thank you all in advance.

Warm Regards
Dipendra

The answer most likely is here. I’ve found using the SSH method most helpful.
https://docs.bitnami.com/google/faq/get-started/find-credentials/

1 Like

Hello @kevin8

Thank you for your quick response.

The command is helpful, but my problem is different.

My website was down and hence I tried to solve it myself. I managed to snapshot the disk and created new instance. After creating new instance, I updated the snapshot then my website was accessible. Till here, I managed to bring my website online.

However, I was unable to delete the previous instance which is still reflected in the main page. Therefore, to find my updated instance, I have to navigate Computer Engine > VM Instances.

The example link you have sent, I followed and tried, showed me the detail of previous instance only.

Is there any other way I can find the password of my updated instance?

Thank you

Warm Regards
Dipendra

Maybe, I can reset MySQL password to get access to my Wordpress Multisite. I tried to find the resources to check the possibilities, but none could help me.

This was the link I followed,
https://docs.bitnami.com/virtual-machine/apps/wordpress/administration/change-reset-password/

or
https://docs.bitnami.com/general/infrastructure/lamp/administration/change-reset-password/

The version of database is MySQL v8+

It will be great help even if I could find a solution to reset my MySQL root password.

Thank you again.

Hello @dipendraksahay,

Have you tried this guide to reset your WP admin password?
https://docs.bitnami.com/google/apps/wordpress/administration/reset-wp-admin-password/

I hope it helps

1 Like

Hello @davidg

Thank you for your quick response.

Yes, I have tried the guide.

mysql -u root -p bitnami_wordpress -e “SELECT * FROM wp_users;”

executing this command, asks for password. I hope, it is the SQL root password, it is also forgotten.

Sorry

Warm Regards
Dipendra

Hello @dipendraksahay,

Did you face issues following this guide?
https://docs.bitnami.com/general/infrastructure/lamp/administration/change-reset-password/

It should help you to reset your MySQL root password and, after that, you should be able to run the previous command.

Apart from that, you could check the default password (for both WP and MySQL root user), by executing this command:

sudo cat /opt/bitnami/var/log/pre-start.log | grep "application password"

Regards

Hello @davidg

Yes, following the guide, I did not find any solution. Executing this command

ALTER USER ‘root’@‘127.0.0.1’ IDENTIFIED BY ‘NEW_PASSWORD’;

displays the error message
-bash: ALTER: command not found

And, after executing next command

sudo cat /opt/bitnami/var/log/pre-start.log | grep “application password”

what is the command to check contents of this log file?

Warm Regards
Dipendra

Hi @dipendraksahay,

It is likely due to you are not accessing MySQL prompt. Note that the documentation says that have to create a file /tmp/mysql-init, with that content:

  ALTER USER 'root'@'127.0.0.1' IDENTIFIED BY 'NEW_PASSWORD';

and then enxecute:

sudo /opt/bitnami/mysql/bin/mysqld_safe --pid-file=/opt/bitnami/mysql/data/mysqld.pid --datadir=/opt/bitnami/mysql/data --init-file=/tmp/mysql-init --lower_case_table_names=1 2> /dev/null &

The file /opt/bitnami/var/log/pre-start.log contains the logs of the scripts that are executed when starting the machine. Executing the command you should obtain something like this:

sudo cat /opt/bitnami/var/log/pre-start.log | grep "application password"
#        Setting Bitnami application password to 'VYift8RRcp1J'         #

Note that in my example, the password is VYift8RRcp1J. This is the default password to access WP and also the MySQL root password.

Regards

Hello @davidg

I tried the command again, carefully reading the instruction. I am receiving the same error message

-bash: ALTER: command not found

I added my own password in the place of ‘New Password’ too, Do I need to omit the enclosing sign single inverted sign( ’ )?

Warm Regards
Dipendra

I tried with the second command, as shown in the example

Setting Bitnami application password to ‘VYift8RRcp1J’

there was no result displayed after the command was executed

sudo cat /opt/bitnami/var/log/pre-start.log | grep “application password”

The cursor positioned in next prompt. No result displayed.

Warm Regards
Dipendra

Hello @dipendraksahay,

I detected a typo in our WP documentation (it points to MariaDB). You should use this link:

https://docs.bitnami.com/virtual-machine/apps/wordpress-multisite/administration/change-reset-password/

Note that is bash interpreter who is trying to interpret the command. Let me share a video to clarify it:
https://asciinema.org/a/WhuTIkhvYmKod1iOZmpxlgVms

This is not a command, but the output of the command sudo cat /opt/bitnami/var/log/pre-start.log | grep "application password".

It is weird, and maybe the file has been removed somehow.

Regards