When I start working on a new site for a client, I like to setup a local subdomain based on the client’s domain like dev.yourdomain.com. Make sure you add this domain to the Settings > General page in WordPress. To do this, you will need to edit the hosts file. Here are some basic directions:
Open Terminal from /applications/Utilities and enter
sudo pico /etc/hostsEnter your user password and this will open the hosts file in the Pico editor. You must have an Administrator account.
At the end of the file, add a line:
Save the file and you should now be able to type dev.yourdomain.com into the browser window and it will open the local version of the site.
Go to the start menu, right click on Notepad and select More > “Run as administrator”.
Copy and paste this path into the File > Open dialog:
Then add this line at the end of the file:
You should now be able to open your local WordPress domain.