I completely rebuilt my live site (reinstalled Wordpress) . However there are some blog posts that I need to retrieve from the old site but forgot to export. Thankfully I have backup files. I followed your instructions over here [Import/Export a WordPress Site ] (Import/Export a WordPress Site - Local)
The import command did not work in the in the Site Shell. I used mysql -u root -proot local < database.sql instead and then run the ‘wp search-replace’ command.
Router mode is set to site domains.
Clicked “trust” on SSL
But the website shows “Page can’t be found”. Tried a different browser. Same result.
Then I attempted to access the wp-admin. Entered the email and password I signed up with Local. It didn’t work either. Hit “Lost your password”, but it didn’t even recognize the email address as an admin email. I’m in a limbo.
I was uncertain when installing Mysql to my PC. There was no default installation to choose from. I opted for “server” instead of “client” or “full”. I’m not sure if this is worth mentioning.
I don’t need the Local site to fully function really. All I need is to retrieve the text from my blog posts.
Yes it did! I’m so relieved. I’m not familiar with MySQL so it’s a lot of trial and error for me. I like to share a few things to help those who encounter the same problem. (can seem stupid in the eyes of an expert )
The above “reset WordPress admin password” tutorial works! But while I was trying to reset the admin password, the Site Shell returned this message: Error establishing a database connection. And this is how I fixed it.
Remember to run MySQL when using Site Shell. I assumed it’s always running in the background, but it isn’t. Two ways to do it:
1-1 Open the MySQL Command Line Client to enter the password (the password you set up when installing MySQL)
1-2 Alternatively, you can open the Run dialog (Windows key + R) and type in “services. msc.” and locate the SQL server service.
In LocalWP set “Router Mode” to “Local host”
Preferences>Advanced> Router mode
After I did 1. and 2. the database connection could then be re-established successfully. And to my surprise, all the site users were missing, and this was why I couldn’t access the WP admin. I was able to set a new admin via Site Shell with the tutorial suggested by Nick-B. In my case, I created a completely new admin user.
But in order to access/view the site. Router mode needs to be switched to “Site domains”
Finally gaining the access to the WP dashboard, I used my backup files to restore the website. One last thing to take note, is that the restoration will override the new admin user that just created via Site Shell but the old admin users and passwords are restored.