How do I reset a WordPress website's administrator email in Lightsail?

1 minute read
0

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:

  1. Use SSH to connect to Lightsail.

  2. 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.

  3. 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';"
  4. 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;"
AWS OFFICIAL
AWS OFFICIALUpdated 4 months ago