Reset the WordPress administrator email address
NOTE: A multi-tier environment typically consists of multiple servers. The steps below should be performed on the runtime server (the server instance running the application), which includes a mysql client. For more information on connecting via SSH, refer to the FAQ.
First, obtain the user ID for the WordPress administrator account from the command line:
$ mysql -u root -h DATABASEHOST -p bitnami_wordpress -e "SELECT * FROM wp_users;"
Replace the DATABASEHOST placeholder with the host where the database is running.
Then, use the command below to reset the administrator email address from the command line.
$ mysql -u root -h DATABASEHOST -p bitnami_wordpress -e "UPDATE wp_users SET user_email='NEW-EMAIL' WHERE ID='ADMIN-ID';"
Remember to replace the DATABASEHOST placeholder with the host where the database is running, the NEW-EMAIL placeholder with the new email address and the ADMIN-ID placeholder with the user ID obtained from the first command.
To obtain the hostname where the database is running, you can execute the following command
$ sudo cat /opt/bitnami/wordpress/wp-config.php | grep 'DB_HOST'
You should see output similar to this:
In this case, the DATABASEHOST placeholder should be replace by “provisioner-peer”.