1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Wordpress in root, how can I install another one in root?

Discussion in 'BlackHat Lounge' started by doroftei, May 16, 2015.

  1. doroftei

    doroftei Junior Member

    Joined:
    Feb 20, 2009
    Messages:
    104
    Likes Received:
    25
    Hi,

    This little problem is wrecking my head. I have one wordpress domain installed in the root of my hosting. I installed a second wordpress for another domain in a subdirectory, I want it to show as it's from root though (seconddomain . com not seconddomain . com /wp ). Part of this, I have to copy index.php and .htaccess from the subdirectory into the root folder, but because I already have those files there...it will affect the first site as well. How can I do this but keeping them separate?
    I plan on getting more domains with wordpress in subdirectory to keep it organized but to work as if from root so I need to figure this out.

    Thanks in advance.
     
  2. TayaX

    TayaX Jr. VIP Jr. VIP

    Joined:
    Dec 13, 2010
    Messages:
    3,533
    Likes Received:
    1,979
    Occupation:
    Skype : TayaxBHW
    Location:
    France
    Home Page:
    Well you have to check what's going on in your administration.

    You should have Root/domain1 and root/domain2 and domain one pointing towards root/domain1 and domain two pointing towards root/domain2
     
  3. seeplusplus

    seeplusplus Power Member

    Joined:
    Aug 18, 2008
    Messages:
    520
    Likes Received:
    168
    This has got bad idea written all over it :)
     
  4. Swaggatron

    Swaggatron Jr. VIP Jr. VIP

    Joined:
    Aug 13, 2015
    Messages:
    231
    Likes Received:
    42
    Gender:
    Male
    Occupation:
    Freelance Writer / Blogger
    Location:
    Travelling
    Home Page:
  5. Repulsor

    Repulsor Power Member

    Joined:
    Jun 11, 2013
    Messages:
    775
    Likes Received:
    280
    Location:
    PHP Scripting ;)
    Assuming you have are using Cpanel, you should be allocating primary domain to root and all other domains to root/domain1, root/domain2 etc.

    That means, your domain1's root is root/domain1. Thats just for you to see. The user doesnt see any of that. User can still access the site as normal at domain.com

    Clear it up before you mess the files and cause trouble. If you want, I can sort it out.
     
  6. JustUs

    JustUs Power Member

    Joined:
    May 6, 2012
    Messages:
    626
    Likes Received:
    588
    You use a redirect in htaccess.

    Code:
    ## redirect blog to /blog
    RewriteCond %{HTTP_HOST} www.somesite/blog/
    RewriteCond %{REQUEST_URI} !^/blog
    RewriteRule ^(.*)$ blog/$1 [L]
    and install in a different root directory with a different database.
     
    Last edited: Feb 13, 2016