• Resolved chamon2

    (@chamon2)


    Hello,

    I’ve been following the instructions for Moving a Root install to its own directory.

    I believe where I’m going wrong is on step 9 below;

    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’);

    My root directory name is argusgazette.com. I’ve amended the line of code to
    require(‘.argusgazette.com.php’);

    and it returns the following error message

    Warning: require(.argusgazette.com.php) [function.require]: failed to open stream: No such file or directory in /home/www/argusgazette.com/index.php on line 17

    Fatal error: require() [function.require]: Failed opening required ‘.argusgazette.com.php’ (include_path=’.:/usr/local/php5/lib/php’) in /home/www/argusgazette.com/index.php on line 17

    Any ideas on how to proceed please?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Just change
    require('./wp-blog-header.php');
    to
    require('./MY_NEW_DIRECTORY_NAME/wp-blog-header.php');

    MY_NEW_DIRECTORY_NAME is the new directory you’ve created below root.

    Jim

    Thread Starter chamon2

    (@chamon2)

    Ok, I’ll hold my hands up, I’m slightly lost.

    My intention is to change my website address from argusgazette.com/wordpress to argusgazette.com.

    Following the instructions on the Giving WordPress Its Own Directory page,

    This is what I’ve done;

    In the box for Site address (URL): changed the address to the root directory’s URL. : http://argusgazette.com

    In this root directory I have a folder called WordPress which was created when I downloaded WordPress.

    Created a .htaccess file, added the code from the Using “Pretty” permalinks page and copied it into my argusgazette.com root directory;

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress

    Copied index.php and from the WordPress root directory(not from the actual WordPress twenty eleven theme folder) into the root directory called argusgazette.com.

    Next I opened my root directory’s index.php file & Changed the line that says:
    require(‘./wp-blog-header.php’);
    to
    require(‘./argusgazette.com/wp-blog-header.php’);

    When I try and got to argusgazette.com it returns the below

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

    Please excuse my ignorance! Some guidance would be super 🙂

    [No bumping, thank you.]

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

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

    Thread Starter chamon2

    (@chamon2)

    Sorry, didn’t mean to bump. Nope, I’m defo doing something wrong, amending the code to what you stated still doesn’t do the trick.

    Can I confirm which option I should be following? I have a root folder called argusgazette.com in my host’s control panel. This contains my WordPress folder.

    I’m trying to amend the URL from argusgazette.com/wordpress to remove ‘wordpress’.

    Have I chosen the correct option in following the instructions on ‘When your Domain Name or URLs Change’?

    Maybe it would be less tricky to uninstall WordPress and begin again, this time using the correct URL of argusgazette.com. Would that be possible?

    I’m trying to amend the URL from argusgazette.com/wordpress to remove ‘wordpress’.

    Then you need to place the modified index.php and .htaccess file copies in the argusgazette.com folder on your account.

    Thread Starter chamon2

    (@chamon2)

    yep, I’ve done that!

    This is the code in 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(‘./wordpress/wp-blog-header.php’);
    ?>

    Your site appears to be working just fine now.

    Thread Starter chamon2

    (@chamon2)

    Thank you! I changed nothing, but I contacted my host with the issue, and now it’s sorted. Thank you so much for your time & efforts! 🙂

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Moving a Root install to its own directory.’ is closed to new replies.