Support » Fixing WordPress » problem with converting 2 WP blogs to use apache virtual hosting

  • timblack


    I installed 2 WP 2.6.1 blogs, each with its own db/user/pass/folder. Initially I placed the folders off of my web document root like so:
    I web browsed to these folders and ran the install scripts in their separate locations and the blogs seemed to be installed and functional.

    Then I set up apache for virtual hosting and tested that it was working by placing simple index.html files in the separate Document root folders. I have problems, however, when I set the Document root for each virtual host to the WP folder where the core .php files reside. What happens when I go to one of the VirtualHost ServerName URLs is that apache does not display the blog, but instead redirects me to (My hostname is “servy” – I think this is related)

    I have tested the virtual hosting aspect of my system, so I believe this to be a WP-specific problem. Please let me know if you have any suggestions. More info at

    If I decide to just start over and reinstall WP, can I simply replace the WP root folders and then re-use the same database I’ve already set up?


Viewing 2 replies - 1 through 2 (of 2 total)
  • timblack


    I also tried updating my wp-config.php files to include
    define('WP_SITEURL', 'http://<My Site URL>/<blog path relative to web root>');
    This didn’t help. Did I use this construct correctly?
    Any other suggestions?



    I did manage to solve the problem by reinstalling both instances of the wordpress blog folder. Just had to clear out the tables in the mysql databases corresponding to each wordpress blog, and then run the install php script again. After that, each of my virtual hosts redirects to the correct blog. 🙂

    I believe that my critical error was moving the blog folders to new locations when I set up the VirtualHosts. It turns out that the wordpress php code needs to know where it is! If you know a good reason for this, please comment.

    There is a procedure for informing the php application about its new location:

    In the end, I just opted for the reinstall.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘problem with converting 2 WP blogs to use apache virtual hosting’ is closed to new replies.