views:

270

answers:

2

I currently use virtual hosts on my computer so that I can manage multiple sites on my computer.

Currently, I use c:/vhosts/php (default localhost) for regular PHP development, c:/vhosts/BTS for Wordpress, and c:/vhosts/cake for CakePHP development. (see below).

Now when I launch my WAMPP and go to http://BTS, it loads the index page but nothing else loads fine. When trying to click on the links, it links to http://localhost/xxxxx instead of http://BTS/xxxxx. What am I missing here? I don't want the server to access localhost since I'm using localhost for other projects. Please help.

<VirtualHost *:80>
DocumentRoot c:/vhosts/php
ServerName localhost
</VirtualHost>

<VirtualHost *:80>
DocumentRoot c:/vhosts/BTS
ServerName BTS
</VirtualHost>

<VirtualHost *:80>
DocumentRoot c:/vhosts/cake
ServerName cake
</VirtualHost>
A: 

You need to tell Wordpress what domain it is sitting on.

Login to your Admin CP, it's in settings somewhere

Charlie Somerville
it won't even let me log into Admin CP on my computer
Hiro
Do what Jeremy says.
Charlie Somerville
+3  A: 

Go into your MySQL database (thru phpmyadmin or whatever) and look for the following fields

In the wp_options table, change

siteurl
home

To http://BTS instead of localhost.

This will update all your links in wordpress.

Jeremy Morgan
Right! Why didn't I think of that. Thanks Jeremy
Hiro