Support » Fixing WordPress » Install in subdirectory but use root directory for URLs?

  • Is it possible to install wordpress into a subdirectory but not use the subdirectory in the URLs for the pages. For example, if wordpress was intalled at, could it bet setup so the page URLs were

    The reason I want to do this is because I have an existing website that is all HTML/PHP. I want to keep the home page and some other pages as is without putting them on wordpress. I want to put the rest of the existing site on wordpress but I want to keep the same URL and folder structure (mainly to avoid needing 301 redirects).

    The current site is already setup to use the same URL structure as wordpress (with / replacing the .php in the URLs). This was, I can migrate to wordpress without any redirects if I can get the folder structures in the URLs to match.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thanks Rajan,

    Thanks for the reply.

    The article states that I have to leave index.php in the root. However, the current site (not using wordpress) already has an index.php for the homepage.

    I need to keep the existing home page index.php. I can’t have both the wordpress index.php and the current index.php. Is there a way to avoid this conflict?

    You can rename current index.php of root level if root file and sub directory files pointing to one domain! If you will be using root for different site and sub directory for different site then it will be problem… you need to have index.php in root to follow this method.

    Just to clarify, I have managed to already install wordpress itno a subdirectory. That is not the hangup.

    I just want to remove the subdirectory name from the URLs of the subpages (not the home page). The home page in NOT using wordpress. wordpress will only be used for sub pages.

    in this case you need to copy over index.php to root i guess like they said:

    The problem is there is already a non wordpress home page using the name index.php. There can’t be both a wordpress index.php and a non wordpress homepage with the name index.php in the root directory.

    When someone go to the domain name, it needs to point them directly to the NON-wordpress homepage file, not to the the wordpress index.php file.

    It there a way in htaccess to define the home page to point to another file by default instead of index.php. That way, users going to the domain root would get directed to the homepage file?

    I don’t want to use simply a 301 redirect to a new page. When they go to I want the URL to stay I don’t want to redirect to a new page and have uses going to the site to go to a URL such as

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Install in subdirectory but use root directory for URLs?’ is closed to new replies.