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?
Blueskygal 2013-02-21 5:04 pm
I was expecting an overview of the basics but went straight to one topic. The title suggests it is an overview.
Blueskygal 2013-02-21 5:04 pm
I was expecting an overview of the basics but went straight to one topic. The title suggests it is an overview.

Login to comment.

Your Opinion Matters

... but we need to know what you're thinking!

The Community Support team wrote the article you're looking at now. We like to think it's perfect, but we're sure you have some suggestions. Please, let us know what they are!

Feedback
Your Email Address
Because we'd like to talk with you!

Have a Question?

If you need some help, submit your question to our Community! We guarantee a response within 60 minutes (8am - 9pm EST, Monday - Friday)

Recent Questions

  1. Site under brute force attack
  2. URLs in Installation of WordPress Don't Redirect
  3. Choosing a Directory With WordPress

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