Migrating WordPress, Temporary Domains, Host File Changes and Testing Before Launch

Content Error or Suggest an Edit

Notice a grammatical error or technical inaccuracy? Let us know; we will give you credit!

Draft Warning

You’ve reached a draft 🤷‍♂️ and unfortunately, it’s a work in progress.

I posted this article Migrating to GridPane using a Temporary Domain on the Self Managed WordPress Facebook group. And I received the following comment.

I thought I would write something to explain why I don’t edit my host file anymore since I started in 2001.

Host Files

If you’ve ever wanted to migrate a website to a new hosting provider, it can be troublesome if there’s no temporary domain provided.

A temporary domain points to your new hosting account; you can have multiple domains point to your hosting account. Whatever content is in your hosting account, all the domain names will point to said content.


cPanel provides the option of a sub-domain or addon-domain that will point to your website’s webroot, which can also be considered a temporary domain.

However, a primary domain must be specified in its configuration when using WordPress. This is typically done via two options. Otherwise, you will be unable to login to the administration.

$ wp option get home
$ wp option get siteurl

If this wasn’t a requirement, there would be no issues

Other Options


You May Also Like

WebWhim Peer Review

Background There is a blog post that has been floating around various WordPress groups from a site called…