Locked out of WordPress after backup installation

0

I set up a WordPress site using Lightsail and uploaded the backup (the site was previously hosted on Google Cloud Platform). Everything went perfectly until I went to the admin and found myself locked out. No passwords work.

I did find a YouTube video that provides a solution but just not with MariaDB. Can someone walk me through the process via SSH so I can access the admin.

profile picture
asked 9 months ago192 views
3 Answers
0

Is Lightsail accessible via SSH?
Is it also possible to access MariaDB with commands?
If the above actions are possible, you can change the password of the WordPress administrator by following the instructions in the document below.
Also, database manipulation is a risky action, so be sure to make a backup of Lightsail prior to operation.
https://repost.aws/knowledge-center/lightsail-reset-wordpress-password

profile picture
EXPERT
answered 9 months ago
0

Your suggestion is correct but only when the WordPress site is still in its original format. When I uploaded the backup to restore the website, it changed everything. I moved the website from Google Cloud Platform to AWS. So I created a backup to facilitate this move. Everything went well. Until I found myself locked out.

Unfortunately, the original passwords from Lightsail are no longer applicable. Even when I went through the steps suggested in the link you sent me, it comes up with the original username and password, which still does not allow me into the site. So, somehow I need to get into the site by some means. The only way is via SSH.

profile picture
answered 9 months ago
0

Have you tried using the wordpress CLI on your Lightsail host which should be pre-installed? You should be able to use the user command to create or update a user with the administrator role.

https://developer.wordpress.org/cli/commands/user/

wp user list --role=administrator should list the administrator users on the site. https://developer.wordpress.org/cli/commands/user/list/

wp user update <user-with-admin-role> --user_pass=<password-you-want> should let you change the user password. https://developer.wordpress.org/cli/commands/user/update/

AWS
Varun_R
answered 9 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions