Testing a Migration: Editing Your Host File

When conducting a site migration, it can be really helpful to see if the move worked properly & the site is functioning before pointing nameservers & making the change live. In a lot of cases, data will transfer “successfully” but then actually require a few extra tweaks before the site is online. Simply put: you need to test the migration before you make it live.

So, to tell our individual computer to look somewhere else before loading a website, we’ll have to edit the host file on our computer.


Log into Terminal.


Type the following, and then press enter.

sudo nano /etc/hosts


Type in your computer password, then press enter.


You should now see a window that looks something like this:

Now you’ll want to locate the new server IP (i.e. where you migrated the content to) and add it to the next line on this window. Then tab forward and type the domain you’re working with.

So for the purposes of this guide, let’s say that I was migrating labrumfield.com to Reclaim’s Dinojr server. The IP for Dinojr is So, my terminal would look like this:

^Make sure to include two lines– one with www., and one without!


Press Control + X.
Press Y to save.
Press Enter.


Clear your browser cache, and then reload the site! You should now be able to identify any errors on the site before it goes live.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Back to Top