Support » Installing WordPress » Installing WP in subdirectory..?

  • Resolved Bliss7


    Hi, to all WP users here. Can someone point out the best way to direct all domain/site requests to WP in a subdirectory?
    I have a domain that is best used as an ezine/news site. However I want to add a blog to it with WP like this: http://mydomain/blog/
    As right now I’m short of money and still trying to figure out how to start an ezine, I decided to focus on developing the blog part of my yet to be ezine for the time being….
    Since I dont want to upset the URLS later in the Search Engines…I want to make the home or index page of my site to point to my blog as in http://mydomain/blog/ and direct all visitors to the blog, and focus on my blog writing.

    I’ve heard htaccess can be used, as in using the command “DirectoryIndex”….

    However I’m not sure if that method will work right with the WP permalinks and its structure.
    Does anyone know whats the best thing to do, as I believe using DirectoryIndex in htaccess works best for .html pages and not sure if it will work for WP since WP permalinks are usually like this: http://rootdomain/2006/12/6/post-title
    and dont show any page.html structure.

    How do I make http://mydomain/blog as the default index page? Advice much appreciated.

Viewing 6 replies - 1 through 6 (of 6 total)
  • A simple way to do that would be to install WP in the directory you want and have the index.php in the root of your site.
    Read about it here:

    Then when you are ready with the other, simply move your index – read about it here:

    Thanks Samboll, good info there.

    Dear Samboll,

    I forgot to ask if its normal for WP not to update the htaccess automatically, once I have installed WP in a subdirectory. I’ve installed WP in http://mydomain/blog

    where all the WP files reside in the /blog folder and I also made a copy of htaccess and index.php and left it in the root http://mydomain

    I followed the instructions as in

    to the letter, and now when I want to update the permalinks, WP tells me to copy the code it displays at the bottom and overwrite the htaccess in the root directory(that also has the index.php). (the Manual way).

    Previously (before moving the core files to the subdir), it could always update the permalinks by itself.

    Is it true now I have 2 htaccess and 2 index.php, one in the new subdirectory and the other in the root directory?

    Thanks for any clarifications…:)My htaccess file is totally 777 writable.

    One nore thingy is although I copied all the WP files into the /blog folder, but the url still displays as http://mydomain

    although I want it to display as


    as the homepage of the blog.

    Can someone help me out? Thanks

    So much for the fuss, I figured out that the permalinks get updated automatically, once I change the blog and wordpress URI as http://mysite/blog
    and use permalinks custom structure as /blog/2006/12/31/postname

    The only problem remaining is how to redirect everyone to the /blog automatically? Although I fixed the posts to follow the URLs like above and starting with /blog/post-name…

    yet http://mysite/ will show a 404 page and doesnt redirect to the /blog/ directory….

    Can someone advise? Is it a totally htaccess file thing? Thanks in advance and have a Happy New Year

    All you’v to do is, open your index.php in the root folder and look for the under quoted line:


    and change this with:


    Note: Remember to change ./blog with the actual folder name, where your WordPress core files are residing.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Installing WP in subdirectory..?’ is closed to new replies.