Support » Installing WordPress » Installing Entirely into a Subdirectory

  • Resolved nathanbeach



    I’ve read a bunch in here about being able to install the WordPress core files into a custom subdirectory (“Giving WordPress its own Directory”). That is not what I’m trying to do. I’m trying to entirely install WordPress into its own subdirectory with no relation to the actual root of the domain.

    In my case, I have no control over the domain root, and cannot edit an .htaccess file there. It’s set up like this:

    I have it working fine on the public side for the most part, but the Admin console does weird things like redirecting to the domain root when I edit settings and click Save. Also, there are several WP functions (such as “Older/Newer Posts”) that render links to “/” rather than relative to the current directory.

    From what I’ve read here and elsewhere, it seems I’m not going to be able to get this to work. I just wanted to check if anyone else has tried to do this and has any ideas.

    I love WordPress. Thanks!

    Nathan Beach

Viewing 7 replies - 1 through 7 (of 7 total)
  • It really doesn’t matter if you are going to install WP in root or subdirectory, the process is exactly the same.

    The .htaccess doesn’t have to be at root either, it will still work. Unless of course if there is a .htaccess at the root, that has instructions to prevent from accessing any other subdirectories.

    To let WP create .htaccess for you, just have to go to

    Admin Panel > Settings > General


    to define:

    WordPress Address (URL)
    Site Address (URL)

    The install part works fine, and most stuff on the site works, but there are certain WP functions that still try to hit the root of the server. For instance, the “Older Posts” link returned by the posts_nav_link function always goes to the root “/”.

    Also, most functions in the Admin console will not redirect properly. For example, editing the blog title in Settings -> General, when I click “Save Changes”, WP tries to redirect to the root:

    And I get a 404. Anyway, I think there’s some stuff deep down in WordPress that’s not letting this work. It’s obviously not really designed to work this way, which is fine. Just wondering if anyone else has tried this.

    Thanks for your response!


    Your WordPress URL and Site URL settings should both be

    They are both set the same. I also just tried moving the site up to “myshare”, so it would be:

    Still, the admin console functions redirect to “/” after clicking “Save Changes”. I’m going to take a look at the source and see if there’s anything obvious.

    Thanks for your response…

    It’s strange you get these problems. I install WordPress in sub-directories almost every month, and it works without problems.

    I even have a WordPress install on the root, another in a folder and another one in a sub-folder and everything works just fine!

    I think something went wrong during the installation with your WordPress site. The fastest way to fix that if you didn’t work much on the website yet is to delete everything and re-install.

    I cannot get this to work. I just set up a new database and tried installing completely fresh to a different directory under my share, and at the end of install, WordPress redirects to the wrong site.

    I think this probably isn’t a WordPress problem. I guess it must be something related to’s shared SSL hosting.

    Thanks for all the help, though…


    marking as resolved

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Installing Entirely into a Subdirectory’ is closed to new replies.