开发者

Wordpress not working when using Apache virtual hosts

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 missi开发者_如何学Pythonng 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>


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.


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

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


I think is in wordpress options in settings in general, then change in WordPress Address (URL) and in Site Address (URL), both need to be the same: This is my configure, but you can change it with BTS

And check if it's right in mysql the configure with select option_name, option_value from wp_options where option_name = 'siteurl';

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜