Cannot access domain.local

I created a new wordpress site in local. Went into it in local and restored the backup of the live site. Now wheneve I access admin it goes to the live site NOT the local install. I edited the wpconfig.php adding
now it says server no found. Can someone tell me where I have gone wrong?

Can you check that the hosts file contains an entry like http://domain.local #Local Site

1 Like

I used the wp cli search and replace which bypassed the existing
database settings and didnt require me to actually access the

I’m in now.

1 Like

Fantastic, you know it’s great if you could share the code you ran after using the SSH to get into the machine.

Can you explain how you did this? I am having the same issue.

Thank You!

@MalekaVrana from the primary LbF window, right-click or control-click on the project. You will see a menu that has ‘Open in SSH’ or similar.

I did this wp search-replace ‘//’ ‘//mydomain.local


I did this wp search-replace ‘//’ ‘//mydomain.local


@afragen and @patbell101 thank you for your patience and help. I am entering (with my domain info) the
wp search-replace ‘//’ ‘//mydomain.local
into the SSH and press enter and I get root@41fee52e338d:/# (and then nothing happens).
When I go to “View site” I am taken to the live site. When I go to “admin dashboard” I am taken the mydomain.local but I get a 404 page not found

Try the following.

wp search-replace --precise

@afragen, thank you. I think I am still doing it wrong. This is what mine looks like

wp search-replace sitedevl.corvus-janitorial.local --precise

Is the domain

You probably need to amend the command to

wp search-replace devl.corvus-janitorial.local --precise

@afragen - The domain is
Am I putting the code in the correct spot? I put it at the bottom of the SSH existing code? When I press enter I get this root@41fee52e338d:/#support

Sorry I’m not certain. I hope someone more adept with WP-CLI search-replace can assist.

I ended up migrating the site to FlyWheel (for the 2 week free trial) and then pulling that site to Local. Total work around but it worked.

1 Like