Assigning a domain to “localhost”
-
Greetings –
I posted a week or so ago about the issues of migrating Wordspress sites – particularly the issues with domain name changes.
This was prompted by my desire to develop my site off-line on my own MAMP server (Macintosh) and then move it to a server on the internet once it was complete. I discovered that too many elements of the WordPress site didn’t update to the new domain name. (primarily SQL database fields pointing to files)
It occurred to me this evening that there might be a way to temporarily assign a domain to my Mac – so I could do my development off-line – and then simply copy the entire thing to my server in the cloud when I was done – assigning the domain I’d registered to that server’s IP address.
Turns out I was right – and it’s pretty easy – although I haven’t tried it yet. Forgive me if this is obvious to a more seasoned WordPress developer. The link below is to an article that tells how to do this on a MAC – I expect there’s similar capability on Windows. (although I expect there might be problems with a wholesale copy of a WordPress site to a different platform – since the MAC is “UNIX-like” – it uses the same file structure as another “UNIX-like” server.
If this idea has land-mines that I don’t foresee, I’d appreciate the feedback. I’ve been in I.T. a long time – but I’m new to WordPress.
https://www.imore.com/how-edit-your-macs-hosts-file-and-why-you-would-want#page1
- The topic ‘Assigning a domain to “localhost”’ is closed to new replies.