Support » Fixing WordPress » Multiple Blogs, One Host, Blog Address Problem

  • Resolved haagendazs1


    Hi everyone,

    so this is the problem. i have 2 wordpress installations on one host right now. blog1’s files are in its own /blog1/ folder, and blog2’s files are in its own /blog2/ folder. i have 2 separate domains, one for each blog (lets just say and currently, in accordance with the Options > General tab, ive made blog1 Blog Address the root of the host, or “” while its WordPress Address is obviously still

    the instructions for doing this, given by
    involve putting the blog1’s htaccess and index.php files into the root of the host. sure enough, now instead of, the address is just that’s fine

    however when i try to do the same with blog2, i can’t replace blog1’s htaccess/index.php files because they’re currently in the root of the host. currently blog2 is in “”, but i want it to be just “”.

    is there any way to make the root’s htaccess/index.php files point to each separate WordPress folder depending on which domain is typed in? at the moment, just redirects to the only way i can get to blog2 is by typing which is very undesirable.

    sorry if this was confusing, i can provide the actual domain names if needed.

    any help would be VERY greatly appreciated!

Viewing 10 replies - 1 through 10 (of 10 total)
  • looking closely at my .htaccess file, it seems to only direct to the index.php file… correct me if im wrong please:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

    # END WordPress

    however, the index.php file looks like this:

    /* Short and sweet */
    define(‘WP_USE_THEMES’, true);

    this seems to be able to direct to only the /blog/ WordPress, whereas my “blog2” has a WordPress directory of /ps/… is there a way of maybe telling the index.php file “if the URL typed in is, go to ./blog/wp-blog-header.php, and if it’s, go to ./ps/wp-blog-header.php”?

    i have 2 separate domains, one for each blog (lets just say and

    Then stop overcomplicating it. Install one instance of WP to domain1 and another instance of WP to domain2.
    It’s that simple. Forget the redirects – WP hates them…


    Thanks for your reply. i’m not quite sure what you mean by it though. I’m relatively new to creating websites so i might just be dumb about it.

    currently there are 2 instances of WP. one is in a folder /blog1/ and one is in another folder /blog2/. they both function right now, but the problem is this: i want the address for both blogs to be just the domain name (ie and right now, i have blog1 set up as, but blog2 only works if i put the URL as if i put just, it redirects to the reason for this seems to be that the htaccess file in the root of the server (which hosts both blogs) goes only to blog1.

    In steps 7-9 of this guide,

    it says this:

    -Copy the index.php and .htaccess files from the WordPress directory into the root directory of your site (Blog address).
    -Open your root directory’s index.php file in a text editor
    -Change the following and save the file. Change the line that says:
    to the following, using your directory name for the WordPress core files:

    that line “/wordpress/wp-blog-header.php” seems to only be able to specify 1 of the 2 blogs i have (ie, i would have /blog1/wp-blog-header.php).

    dont forget that i only have 1 host server thing, and they host both domains and

    sorry again if this in fact is overcomplicating/confusing everything…

    a friend of mine suggested to use the variable $_SERVER[“HTTP_HOST”] to retrieve whether the URL is or… putting this in an if statement in index.php, i made it so if it retrieves, then it would require ./blog1/wp-blog-header.php and if it retreieves, it would require ./blog2/wp-blog-header.php. i tried this but something went wrong and i just get a blank page in both and

    again, any help would be really appreciated!! 🙂

    Read my reply again: do NOT install WP in any kind of subdirs… if you want them to be displayed at
    Install WP there, exactly in the root of and – what is so complicated in this?


    i still don’t quite understand what you mean by this. the way i’ve been seeing it, both and have the same root…

    both and have the same root…
    That is impossible.


    maybe im using incorrect terminology here… both of the domains are hosted at the same location… and it seems quite possible to me cause that’s what i have right now.

    Nevermind, i figured out how to do this on my own.

    For anyone else who may have this problem in the future, all i did was use the variable:

    $host = $_SERVER[‘HTTP_HOST’];
    if ($host == “”) {
    require (blog1’s header);
    if ($host == “”) {
    require (blog2’s header);

    thanks for trying anyways moshu

    Hi haagendazs1,

    I realize this thread is resolved, but I was not able to get your solution working for my blogs. I have the same situation: two blogs, two different domains, one host. I tried following the instructions at:

    However, my sites are already broken, so I cannot access the options panel to change the blog and wordpress addresses. Did you install everything in the root directory or do you have each blog in a subdirectory. When I tried to use your solution ($host = $SERVER… the blogs still did not work.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Multiple Blogs, One Host, Blog Address Problem’ is closed to new replies.