Forums

WordPress Not in Root Question - Made Changes But Path Not Updated (4 posts)

  1. watermelonkid
    Member
    Posted 10 months ago #

    Hello,

    So I've been building a WP site in a folder called "Staging" to hide it while building it. So, today we changed the .htaccess at the root to point toward Staging as the root. (We do NOT want the install at the root because there's a lot of other services/apps/etc. there and this helps it stay clean.)

    So files are at http://www.mysite.com/staging/.
    I changed the Site URL setting to http://www.mysite.com/, but left the WP install path at http://www.mysite.com/staging/.

    Everything seems to function OK, but if I look at the source, it still has the /staging/ in all the menu paths and all paths in the header. They FUNCTION, but I feel like they should reflect the Site URL setting. Is there something I can do?

  2. MichaelH
    Volunteer
    Posted 10 months ago #

    To make WordPress available at http://mysite.com in Settings->General, change the Site address (URL) to http://mysite.com and put this index.php file in your web-root folder (it is the same folder that contains the staging folder)

    <?php
    /* Short and sweet */
    define('WP_USE_THEMES', true);
    require('./staging/wp-blog-header.php');
    ?>
  3. watermelonkid
    Member
    Posted 10 months ago #

    I already have the .htaccess at the webroot directing web traffic to the staging folder because I'm hosting another site at the root--so I can't have an index.php in the root. Do I need to remove that command from the .htaccess?

  4. MichaelH
    Volunteer
    Posted 10 months ago #

    Not sure how or why you would have two sites using the same web-root folder -- at least that's what it seems.

Reply

You must log in to post.

About this Topic