'How To' Site for Website setup using Wordpress

How to Configure WordPress for your Domain, without DNS

I recently answered this question on a forum so I figured it was a great tip to post here also. I found that repeatedly, people struggled with installing and configuring their website without having DNS setup. The scenario for this would be you are moving hosting accounts or running on a local development server. Using my trick will allow you to debug on the live domain while DNS points at the old server.

  • Add the domain to your hosting account setup as if you were going to host it there. If/When asked any questions about DNS, answer configure later or I have my own.
    • Windows (c:\windows\systyem32\drivers\etc\hosts)
    • Linux (/etc/hosts)
    • Mac /private/etc/hosts
  • Modify the Hosts file on your local computer to point at your domain and hosting account.
    **********************************
    #xxx.xxx.xxx.xxx is the ip of your new hosting or development server
    #yourdomain here is your domainname
    xxx.xxx.xxx.xxx yourdomainhere #<----add this line
    **********************************
  • Open a browser and go to your website. You should go to the new hosting account not your old site.
    If you have WordPress installed on the new hosting account you can now point your browser and configure it for your
    real domain.
  • If you want to view your old site you will have to put a # at the beginning of the line that contains you domain in your hosts file.

2 Responses to How to Configure WordPress for your Domain, without DNS

  1. You know, I have to tell you, I really enjoy this blog and the insight from everyone who participates. I find it to be refreshing and very informative. I wish there were more blogs like it. Anyway, I felt it was about time I posted.

31 queries in 2.667 seconds.