I want to reset a WordPress administrator email in Amazon Lightsail.
Resolution
To reset a WordPress website's administrator email address, complete the following steps:
-
Use SSH to connect to Lightsail.
-
Get the WordPress administrator account's user ID:
$ mysql -u root -p bitnami_wordpress -e "SELECT * FROM wp_users;"
Note: The default username and password are in the /home/bitnami/bitnami_credentials file.
-
Reset the administrator email address:
Note: Replace example-DATABASEHOST with your host, example-NEWEMAIL-ADDRESS with the new email address, and example-ADMIN-ID with the user ID.
$ mysql -u root -h example-DATABASEHOST -p bitnami_wordpress -e "UPDATE wp_users SET user_email='example-NEWEMAIL-ADDRESS' WHERE ID='example-ADMIN-ID';"
-
To verify that the email address is updated, get the administrator account's user ID:
$ mysql -u root -p bitnami_wordpress -e "SELECT * FROM wp_users;"