• Hello,

    I have read through the following and understand everything minus specifically what to place before /wp-blog.header.php.

    https://codex.www.ads-software.com/Giving_WordPress_Its_Own_Directory

    All my files are in a subdomain, ie., v1.mydomainname.com.

    The example below seems to show how to change that /wp-blog-header.php file and doesn’t give specifics as to what to place in front.

    Change the following and save the file. Change the line that says:
    require(‘./wp-blog-header.php’);
    to the following, using your directory name for the WordPress core files:
    require(‘./wordpress/wp-blog-header.php’);

    What would I put in place of ‘wordpress’ as again this is not a directory but a subdomain – just concerned about getting the path correct.

    Thank you

Viewing 4 replies - 1 through 4 (of 4 total)
  • Even though it’s a subdomain, it’s still listed as a folder in your root directory. For instance, if your normal website is www.mysite.com and you make a subdomain of mystuff, the url of the subdomain site would be www.mystuff.mysite.com.

    However, all the files of your mystuff subdomain would still be located in the root of your mysite domain as a subfolder called mystuff.

    So just change wordpress to mystuff (in this example).

    Make sense?

    Thread Starter bwboykin

    (@bwboykin)

    Hey Josh,

    Thanks for the good info.

    This is what I am getting.

    I’ve changed the Site URL to its appropriate title and left the URI to its original

    Warning: require(./wp-blog-header.php) [function.require]: failed to open stream: No such file or directory in /home/content/23/8690023/html/index.php on line 17

    Fatal error: require() [function.require]: Failed opening required ‘./wp-blog-header.php’ (include_path=’.:/usr/local/php5/lib/php’) in /home/content/23/8690023/html/index.php on line 17

    Are you putting your subdirectory before the /wp-blog-header.php?

    All I see in your code is a dot .

    Thread Starter bwboykin

    (@bwboykin)

    This is the index.php file

    <?php
    /**
     * 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 */
    require('./v1/wp-blog-header.php');
    ?>

    The only files I have moved to root have been index.php and .htaccess

    Again, all development files reside under the ‘v1’ subdomain…

    Thanks Josh

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Moving WordPress from subdomain to root’ is closed to new replies.