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
已提问 10 个月前199 查看次数
3 回答
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
专家
已回答 10 个月前
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
已回答 10 个月前
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
已回答 9 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则