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 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.

About Lauren Brumfield

Lauren has been the Operations Manager at Reclaim Hosting for the last two years. She graduated from the University of Mary Washington with a BA in English with a concentration in Creative Writing.
View all posts by Lauren Brumfield →

Leave a Reply

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