• I have my blog set up in /blog directory and I want to now use the static home page as my index page.

    So if I move the /blog/index.php

    to /index.php

    will that do it – do I have to modify some other file – like the config file – if so how ?

    The index file contains:
    <?php
    /* Short and sweet */
    define(‘WP_USE_THEMES’, true);
    require(‘./wp-blog-header.php’);
    ?>

    Appreciate any help

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Your moving everything in “blog” to the root or main directory right?

    If so: I dont see anywhere you have to change anything (in wp-config only)

    But it depends on your config file… (i think)

    If your moving only index.php: You’re going to have to change

    require(‘./wp-blog-header.php’);

    to

    require(‘./blog/wp-blog-header.php’);

    but I’m not too sure
    You might want to post your config file..?

    I am sorta a n00b @ this

    How about this–assuming katycool.com is where you want visitors to see your blog:

    1. Don’t move any files
    2. Login, change your Options->General, Blog Address {URL} to https://katycool.com
    3. Put this index.php file in your web-root folder:

    <?php
    /* Short and sweet */
    define('WP_USE_THEMES', true);
    require('./blog/wp-blog-header.php');
    ?>

    Reference:
    Giving_WordPress_Its_Own_Directory

    Thread Starter cattykool

    (@cattykool)

    Thanks for the help.

    I put one inex file in the root:
    <?php
    /* Short and sweet */
    define(‘WP_USE_THEMES’, true);
    require(‘./blog/wp-blog-header.php’);
    ?>

    and left one in the bol directory:

    <?php
    /* Short and sweet */
    define(‘WP_USE_THEMES’, true);
    require(‘./wp-blog-header.php’);
    ?>

    I f I dont have the one in the /blog then I just get served up a directory listing instead of a page.

    Seems to work OK with the two index files ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to move my index.php to root directory ?’ is closed to new replies.