• Resolved Francesco01

    (@francesco01)


    After successfully installing and creating vinibertoja.it in his own folder (vinibertoja.it/wp) I have tried to move the index to root following the Codex instructions (Using a pre-existing subdirectory install). I must have make some mistakes because it did not work. I tried to put back the files I moved to the wp folder but now when I type vinibertoja.it/wp I get:

    Warning: require(/wp/wp-blog-header.php): failed to open stream: No such file or directory in /web/htdocs/www.vinibertoja.it/home/wp/index.php on line 17 Fatal error: require(): Failed opening required ‘/wp/wp-blog-header.php’ (include_path=’.:/php5.3/lib/php/’) in /web/htdocs/www.vinibertoja.it/home/wp/index.php on line 17

    I have tried some of the tips I found in the forum with no success.

    Can anyone help me? I would be extremely grateful!

Viewing 9 replies - 1 through 9 (of 9 total)
  • If you check in the index.php file in your /wp/ directory, what does it say on line 17?

    It should say:

    require( dirname( __FILE__ ) . '/wp-blog-header.php' );

    But perhaps you edited the one in the root folder and used it to overwrite this one. What it should NOT say:

    require( dirname( __FILE__ ) . '/wp/wp-blog-header.php' );

    Thread Starter Francesco01

    (@francesco01)

    Hello Senff, thanks for the extremely fast reply!
    My index.php in my wp directory says:

    <?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(‘/wp/wp-blog-header.php’);

    —–

    Have I got the wrong index.php?

    Thread Starter Francesco01

    (@francesco01)

    Hello Senff … sorry for sending incomplete message … will try to change ‘/wp/wp-blog-header.php’ into ‘/wp-blog-header.php’

    πŸ™‚

    Thread Starter Francesco01

    (@francesco01)

    Hi Senff …

    sorry to say that now I get:

    Warning: require(/wp-blog-header.php): failed to open stream: No such file or directory in /web/htdocs/www.vinibertoja.it/home/wp/index.php on line 17 Fatal error: require(): Failed opening required ‘/wp-blog-header.php’ (include_path=’.:/php5.3/lib/php/’) in /web/htdocs/www.vinibertoja.it/home/wp/index.php on line 17

    Thanks for any further help you can give ….

    Change line 17 in index.php from this:

    require('/wp/wp-blog-header.php');

    To this:

    require( dirname( __FILE__ ) . '/wp-blog-header.php' );

    Thread Starter Francesco01

    (@francesco01)

    Senff … we are getting close to it!

    I can now see the site on vinibertoia.it/wp but without theme.
    Also I am unable to access vinibertoia.it/wp/wp-admin to fix the theme.

    Do I have to do something on .htaccess or wp-config.php ?
    Just wondering … hopefully you have a clearer idea …

    thanks for the help so far!

    Thread Starter Francesco01

    (@francesco01)

    CORRECTION vinibertoia > vinibertoja

    this is the message I get when I try to access vinibertoja.it/wp/wp-admin

    Not Found

    The requested URL /wp-login.php was not found on this server.

    and I get redirected to
    http://www.vinibertoja.it/wp-login.php?redirect_to=http%3A%2F%2Fwww.vinibertoja.it%2Fwp%2Fwp-admin%2F&reauth=1

    Any clue?

    You probably still have the URL settings for when the site was in the root.

    Normally I would tell you to go into Settings -> General and make sure that both the WordPress Address (URL) and Site Address (URL) are set to http://www.vinibertoja.it/wp, but you probably can’t log in to the site because of this.

    So add these two lines to the bottom of your wp-config.php:

    update_option('siteurl','http://www.vinibertoja.it/wp');
    update_option('home','http://www.vinibertoja.it/wp');

    Now when you view the site, things should be fine again, and you can/should remove the two lines.

    Thread Starter Francesco01

    (@francesco01)

    Dear Senff,
    your suggestion has worked perfectly and now I have a again a full working website.
    Thanks very much for your higly professional help!

    Francesco

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Warning: require(/wp/wp-blog-header.php) after trying to move’ is closed to new replies.