Support » Installing WordPress » Installing wordpress in subdirectory

  • Resolved dave9966


    Hello , I have tried reading and reading and reading about creating and installing wordpress as a subdirectory

    I currently have a html website installed under modgraphic dir

    I installed wordpress in modgraphic/blog

    I updated the general settings to match modgraphic/blog for both

    I have updated the permalinks and htaccess

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /blog/
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /blog/index.php [L]

    and I updated the index.php file to have


    when I visit I see and empty folder,

    Now there is an empty folder on the server parallel with modgraphic

    How or what do I have to do so that the url

    modgraphic/blog points at the proper folder

    any help is much appreciated! 🙂

Viewing 6 replies - 1 through 6 (of 6 total)
  • I think I need to have a condition in my root directory htaccess that says
    if the url http://www.modgraphic/blog is entered than point to the proper folder

    cause right not a subdirectory that is called mographic is the main site

    Moderator Mark Ratledge


    Forum Moderator


    DirectoryIndex index.php

    at the top of the .htaccess file in /blog/

    That tells apache to default to index.php in the /blog/ directory. Probably in the .htaccess file in the main web directory, .htaccess defaults to index.html and .htaccess files inherit to subfolders.

    so my file structure is as follows


    and wp is installed in root/modgraphic/blog/

    which /blog do I add DirectoryIndex index.php ?

    and seems to be going to


    I think you got confused and followed a lengthy step instead of an easy way. Just create a new directory called ‘blog’ under the modgraphic folder and upload the wordpress files to the Blog directory, then install it… That’s simple.

    I did this…. but if you visit you will see the parent directory, and I believe its getting confused somehow

    Ok so I got it working….. I had to add
    RewriteCond %{HTTP_HOST} ^(www.)?$
    RewriteRule ^(/)?$ modgraphic/blog/index.php [L]

    to the .htaccess in the root directory because as I said before it was going to the dir “blog” which parallel with the modgraphic folder

    I also then had to remove the “blog” from


    Everything is good now!

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