I'm sure at this point, you're a combination of excited, anxious, and a bit nervous. You've just migrated a database, moved quite a few files from one server to another, and updated a WordPress configuration file! We've got one more step to go, and this is to test your website by using a hosts file modification.

Before we continue, let's summarize our scenario:

  1. We're changing hosting companies, HostXYZ to Web Hosting Hub, and in this move we need to migrate our WordPress Site my-wordpress-site.com
  2. We want to test our WordPress Site before pointing it from HostXYZ to Web Hosting Hub to ensure there are no problems for us or our site visitors.

That's it. We've done all of the hard work, and now we need to test the site. We can't just visit my-wordpress-site.com, as this will show the site on HostXYZ's servers and not the content we just migrated. We also can't use our Temporary URL as WordPress is domain specific, in our case meaning the site won't look right on the Temporary URL. There are several other ways to test your site, but we find that doing a hosts file modification is by far the most accurate.

How does a hosts file modification work?

When you type in my-wordpress-site.com into your browser, your computer needs to know which web server to contact to download the webpage. It finds this server's address by asking a nameserver. You can think of a nameserver as a phone book. If you need to know someone's phone number, you look in the phone book. Your computer does the same thing, but it uses a nameserver instead.

If my computer asks a nameserver for the address of my-wordpress-site.com, it will return the address for a server at HostXYZ, which will not allow me to properly test. A hosts file modification instead tells your computer to NOT looks at the namserver (ie. phonebook) but to instead use a specific address (your server's IP address here at Web Hosting Hub). In this way, you can visit my-wordpress-site.com and see what it will look like on Web Hosting Hub's servers compared to HostXYZ.

Keep in mind that this change is only affecting your computer. All of your regular website visitors will continue to see your webiste on HostXYZ's servers, so you can test and debug all you need without causing any interruption for your normal visitors.

How do I test using a hosts file modification?

For more help with modifying your hosts file, please see either of the following links:

Windows - How to Modify your Hosts file
Mac - How to Modify your Hosts file

After you have successfully tested WordPress on the Web Hosting Hub server, you can be confident that when you update your domain's nameservers towards the end of the transfer process there should be little to no issues with your website after the move.

Did you find this article helpful?

We value your feedback!

Why was this article not helpful? (Check all that apply)
The article is too difficult or too technical to follow.
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
How did you find this article?
Please tell us how we can improve our Help Center:
Email Address
Optional, but our team may contact you for more information.
Did you find this article helpful?

Comments

2013-08-15 6:36 pm
I followed the steps to migrating WordPress, twice. When I get to the end, the WordPress installation screen comes up.
Another thing is that the fifteen minutes to migrate WordPress files took a couple of hours. Was everything supposed to be copied?
Still trying to get this going.
9,413 Points
2013-08-15 8:11 pm
arnelc
Staff
Hello PastorWill,

Sorry to hear you're having some difficulty with getting WordPress migrated. If you're having problems with all of the steps in migrating your WordPress site, then there's probably a factor that's not part of the migration steps that you're having an issue with.

I took a look at your account, and it appears that your domain name servers is still not pointed to our hosting server. If I type your primary domain into a browser it's going to a different host.

WordPress is a URL-centric application in that it takes the URL used in the installation (in this case stored in your database) to generate the URL for the pages of the WordPress site. If you're not using the domain name, then the URL that you're trying to use is incorrect. If you want to use the temporary URL, you would have configure WordPress to use it. Check out this article for more information on this option: Setting Up Wordpress using the temp URL.

If you change the name servers for the primary domain, remember that the change is not instantaneous. There is a slight delay of up to 24 hours called DNS propagation. I hope this helps to answer your question. Please let us know if you still require assistance.

Regards,
Arnel C.

You can

Post a Comment

Name:
Email Address:
Comment:
Are you a bot?
Submit

Please note: Your name and comment will be displayed, but we will not show your email address.

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!

Help Center Search

Current Customers

Email: support@WebHostingHub.com Ticket: Submit a Support Ticket
Call: 877-595-4HUB (4482)
757-416-6627 (Intl.)
Chat: Click To Chat Now

Ask the Community

Get help with your questions from our community of like-minded hosting users and Web Hosting Hub Staff.

Not a Customer?

Get web hosting from a company that is here to help.