How to install WordPress without a domain name

Great tip for Windows 7 users.

Amplify’d from wpgarage.com

This is one of those life-changing, super-awesome tips that I wish I had known about years ago. Note that this only works on Windows, and I’ve only tested it on Windows 7.

Here’s the scenario: you’ve got a client who has a website up and running on their domain name, http://www.mysite.com. You are creating a new WordPress site for them, but their old site needs to stay up until the very last minute. It would be great to be able to get their whole WordPress site installed and ready to go on a live server (i.e. not your localhost on your computer), and switch the domain’s DNS and voila – the new site replaces the old site almost immediately.

But you can’t really install and work with WordPress on a server that doesn’t have a domain name pointed at it. So here’s how you can fake this by making your computer think that the new site installation should be displayed as http://www.mysite.com:

  1. Install WordPress on the new server via Fantastico, Quick Install, or something like that.

  1. Find the following file in Windows: ?C:WindowsSystem32driversetchosts. Open hosts in Notepad or another text editor.

  1. Add the following line to the end of the file:
    123.45.678.90 mysite.com
    Where 123.45.678.90 is the IP address of the new server, and mysite.com is the domain name that powers the existing site. Here’s a screenshot of how it should look:
    Windows hosts file for IP redirection
Windows hosts file for IP redirection

  1. Save the file. Now visit mysite.com in your browser, and you’ll see your new WordPress installation.

Hat tip to Mark Kaplun for this amazing trick.

Read more at wpgarage.com

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s