Subdirectory Install and the Main Directory (16 posts)

  1. cwfrizzell
    Posted 3 years ago #

    Reference cwfrizzell.com

    I have WordPress loaded in a subdirectory called Blog, but want it to run my site's root. The blog itself works fine (cwfrizzell.com/blog/), but I can't seem to make it show up when going to the root directory. Here's what I have done so far:

    I followed these directions: Giving WordPress Its Own Directory. Specifically, I followed "Using a pre-existing subdirectory install" step for step (include move, not copy).

    I also went into WordPress General Settings and changed the following:

    WP address url: http://www.cwfrizzell.com/blog
    site address url: http://www.cwfrizzell.com

    A secondary problem: My blog actually comes up as http://www.cwfrizzell.com/blog/blog/

    I would truly appreciate any help!

  2. arncus
    Posted 3 years ago #

    Hello Cwfrizzell,

    This is a pretty common problem - and a headache, sorry for your frustrations! WordPress has actually provided an excellent tutorial for this in their tutorial. I think you used the wrong tutorial. Check this one out:

    Moving WordPress

    You'll need to use the instructions where you're changing the URL, because you're wanting it at your site's root without the subdirectory "blog" in the URL, right?

    [ Signature moderated. ]

  3. cwfrizzell
    Posted 3 years ago #


    thanks for the response. To be clear, I am not moving the blog. It has always been installed in a subdirectory called Blog. I don't want to move the blog to another directory; I just want to be able to see the blog (not the files) on the main directory. Your link doesn't make sense to me or seem to do what I actually want to do. What am I missing?

  4. Ryan Cowles
    Posted 3 years ago #

    Hi cwfrizzell,

    It sounds like you want to give WordPress its own directory. The Using a pre-existing subdirectory install section under Giving WordPress Its Own Directory in the Codex has step-by-step instructions on the process.

    If you run into any issues, or if you have any specific questions just give me a shout!

  5. cwfrizzell
    Posted 3 years ago #

    Ryan, thanks for the response. I followed those directions exactly. The basic site still opens to a blank page and not to my blog.

    Clearly I'm missing something, I just don't know what exactly...

  6. Ryan Cowles
    Posted 3 years ago #

    Hm, when I visit http://www.cwfrizzell.com/ it seems to redirect me to http://www.cwfrizzell.com/blog/. I apologize if this seems redundant, but I would recommend just checking over each step again.

    • Under Settings > General, are both the Site Address and WordPress address fields set correctly? Site Address should be http://www.cwfrizzell.com/ and WordPress address should be http://www.cwfrizzell.com/blog/
    • Did you copy both the index.php, and .htaccess files from /blog/ to your root directory?
    • In the index.php in the root directory, did you change require('./wp-blog-header.php'); to require('./blog/wp-blog-header.php');
    • Did you visit Settings > Permalinks to make sure they are set up correctly? Sometimes you need to flush the Permalink settings by clicking "Save" again.

    If you are still having problems after double checking everything, give me a shout and I'll see if I can find a solution.

  7. cwfrizzell
    Posted 3 years ago #

    Thanks again for responding.

    I purposely did the redirect because of this problem, but removed it and repeated the steps as you suggested. Specifically,

    • site address and WordPress address are correct as you describe
    • both index.php and .htaccess copied to root
    • changed index.php in root directory as you stated
    • saved the Permalinks settings

    Still end up with blank front page...

  8. cwfrizzell
    Posted 3 years ago #

    All, thanks for help thus far. Still stuck. Anymore ideas?

  9. Ryan Cowles
    Posted 3 years ago #

    I'm sorry to hear that you still haven't been able to get this fixed... Do you have anything in the existing root directory? And has either .htaccess file been modified in any way?

    Also, it's worth a shot - After you copied and modified the index.php and .htaccess files to the root, did you clear your cache? Did you try from multiple machines? Do you have any server side caching?

  10. cwfrizzell
    Posted 3 years ago #

    There's nothing else in the root directory out of the ordinary. As for clearing cache, if you mean from the computer I'm working, then yes. I also tried from multiple machines with no success. Clearly, it's a server side issue. As for server side caching, I'm just not up to speed on that at all.

    Unfortunately, this problem has taken a back seat to a new 500 error on the main page (http://www.cwfrizzell.com); probably having to do with the .htaccess and index.php files since the error didn't exist prior. Between trying to work with a premium theme update and squaring the WP subdirectory issue, I have pegged my fun meter with the whole thing. I haven't given up; I'm just not smart enough yet to resolve anything.

  11. Ryan Cowles
    Posted 3 years ago #

    I'm sorry to hear about all of the problems you've been experiencing - I know how frustrating it can be when things aren't working, heh.

    Have you modified anything else, or just the index.php and .htaccess? For testing purposes, can you rename both of those files (to something like back.htaccess and index-back.html) and see if the 500 error still returns on the main page?

  12. cwfrizzell
    Posted 3 years ago #

    I've actually gone as far as deleting the files to test that line of thinking. No luck.

  13. Ryan Cowles
    Posted 3 years ago #

    What was in the root directory before? Sorry for all of the questions, but this one has me a little baffled...

  14. cwfrizzell
    Posted 3 years ago #

    The root directory has always been http://www.cwfrizzell.com. When I first installed WP a couple years ago, I explicitly chose to install it in a subdirectory (/blog). That has never changed.

  15. Ryan Cowles
    Posted 3 years ago #

    Thanks for the additional info. Up until now, was there anything in the root directory at http://www.cwfrizzell.com? Or was it just empty? Was/is there an .htaccess file?

  16. cwfrizzell
    Posted 3 years ago #

    A few:


    There is a .htaccess file:

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

    And an index.php file:

     * Front to the WordPress application. This file doesn't do anything, but loads
     * wp-blog-header.php which does and tells WordPress to load the theme.
     * @package WordPress
     * Tells WordPress to load the WordPress theme and output it.
     * @var bool
    define('WP_USE_THEMES', true);
    /** Loads the WordPress Environment and Template */

Topic Closed

This topic has been closed to new replies.

About this Topic