Do you ever have to migrate a wordpress (or any other) site and not sure how to test it before you make a DNS change? There is an easy setup for doing this. In this we will use the domain as our example. which will be hosted on the ip These can be changed out for anything you need them to be.

Set up the destination server how you need to for the final product.
Now you need to change your hosts file.
On mac, open terminal and run the command sudo vi /etc/hosts

On windows, open Windows/System32/drivers/etc/hosts as an administrator in notepad

add the line and save
visit and you should see the new site.
After these steps, the domain will act like it is being hosted at the new location because your computer will use the resolution of to the ip and will not look at your DNS you currently have set up.

After you are done working on the site, make your DNS changes and remove the entry from the hosts file.