Local website build using live domain name

I am not a developer but i understand a bit of development

I have a website that is currently live and I want to create a new website with the actual live domain name but using local on my machine.

However I have downloaded Local and installed wordpress. I have gone to overview and added the actual site domain which is the live domain name.

When I go to wp admin it redirects me to the actual LIVE website which not what I want. I want to build locally a new website on my machine but using the actual live domain name.

I was made to understand this can be done through Local.

Security Reminder
Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.

Hey @dude - For the reasons you’ve described, it’s inadvisable to have the same domain in Local as the live website. It will only lead to conflicts and issues. Your Local domain would be best to have end in .local instead of .com. Or if you change your Router Mode to Localhost (Preferences>Advanced>Router Mode) it will be something like localhost:10058.

I would recommend keeping your Local domain different, and after you change it you might need to flush the caches in your browser if you’re still having redirect trouble.

FIrstly Nick-B that you for your reply

this is fairly new to me…so as you have described

if the live site was for example www.domainname.com - what you are telling me is to have a different domain name like www.domainname.local - is that correct and when I have completed the build of the new website I will migrate it to a new server. What would I need to do if I need to point the live www.domainname.com to the new website - what step do I need ensure it goes smoothly?

You are correct! This is pretty standard developing practice whether using a development application or a staging site on a server. When you migrate your site into the live site, depending how you do it will depend on what steps to take. Using a migration plugin for example, a lot of the search and replace work will be done automatically (searching for references to the local domain, and replacing them with the live domain). Sometimes however these don’t all get caught, or if you are manually migrating you might have to run all the S/Rs yourself using something like SSH however there are plugins that can help with this as well like Better Search Replace!