• Resolved ranessirhc

    (@ranessirhc)


    I’m trying to make my wordpress blog my home page.

    I tried changing my index.php file as directed.

    I tried the code

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

    I also tried

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

    I keep getting an error that looks like this:

    Warning: require(wp-blog-header.php) [function.require]: failed to open stream: No such file or directory in /home/myfitne3/public_html/index.php on line 4

    Fatal error: require() [function.require]: Failed opening required ‘wp-blog-header.php’ (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/myfitne3/public_html/index.php on line 4

    Can someone please help?

Viewing 6 replies - 1 through 6 (of 6 total)
  • moshu

    (@moshu)

    No, we can not, unless you give real details.
    Where is your site? Where is WP installed?
    What is in the root of your site?

    Thread Starter ranessirhc

    (@ranessirhc)

    My site is https://myfitnesswithchris.com. WordPress is installed at myfitnesswithchris/blog. I assume root means /public_html?

    moshu

    (@moshu)

    Yes, for the root question.

    So, why do you change the recommended code line?
    Giving_WordPress_Its_Own_Directory
    Follow the steps! (obviously, skip #6)

    Thread Starter ranessirhc

    (@ranessirhc)

    I tried following those steps but I still get this message

    Failed opening required ‘wp-blog-header.php’ (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/myfitne3/public_html/index.php on line 4

    I have index.php in the root and also under
    public_html/index.php and also have one in public_html/blog/wordpress. Do I have too many for some reason?

    moshu

    (@moshu)

    Well, now you are introducing completely new info…
    According to your latest post your WP is NOT in public_html/blog but in public_html/blog/wordpress

    THAT IS your problem! The installation says clearly: do not upload the wordpress folder, only its content!

    Also, this doesn’t make sense, sorry:
    I have index.php in the root and also under
    public_html/index.php

    public_html/index.php is THE index in the root. You cannot have another index “under”…

    In the public_html you should have WP’ index file with the include line pointing EXACTLY to your WP install location:
    if it is in /blog folder, then:

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

    Do not change anything in the code above!!!

    If your WP is installed in public_html/blog/wordpres then you need this:

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

    (@ranessirhc)

    Thank you so much for your help and your patience. I know these are simple things. It’s just so easy to screw things up when you have no idea what you’re doing. Thank you very much. Aloha.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Making WordPress Blog My Home Page’ is closed to new replies.