• I am attempting to configure WordPress on a server at a (free) hosted site that does support WordPress, but I am having trouble getting it set up with WordPress in a subdirectory (/blog) rather than in the root directory as is described here:

    http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory

    Here are the steps I followed:

    1) I installed WordPress following the process described on the WordPress site. The database was configured properly and the install went fine. The install was done in the subdirectory /blog.

    2) I ran the install.php in the wp-admin folder and everything was working fine.

    3) I then followed the steps in the above referenced link to the letter. Once I removed the install.html file in the root directory I attempted to load the site jonbonesteel.com site, the index.php throws the following errors on the “require( dirname( __FILE__ ) . ‘/blog/wp-blog-header.php’ );” line:

    Warning: require() [function.require]: Unable to access /www/99k.org/b/o/n/bonehome/htdocs/wp-blog-header.php in /www/99k.org/b/o/n/bonehome/htdocs/index.php on line 17

    Warning: require(/www/99k.org/b/o/n/bonehome/htdocs/wp-blog-header.php) [function.require]: failed to open stream: No such file or directory in /www/99k.org/b/o/n/bonehome/htdocs/index.php on line 17

    Fatal error: require() [function.require]: Failed opening required ‘/www/99k.org/b/o/n/bonehome/htdocs/wp-blog-header.php’ (include_path=’.:/usr/lib/php’) in /www/99k.org/b/o/n/bonehome/htdocs/index.php on line 17

    Note: I have since replaced the index.html stub I have created there. Also (IMPORTANTLY), the jonbonesteel.com redirects to the the actual domain on this server which is:

    bonehome.99k.org

    I have tried a number of modifications to the require function to no avail. If someone could at least explain the errors I am receiving so I can make the appropriate fixes I would appreciate it.

    I’m guessing it may be something that is site specific.

    Thanks in advance,

    Jon

Viewing 10 replies - 1 through 10 (of 10 total)
  • Is this a new install? If so why not start over?

    Thread Starter Bonedoggie

    (@bonedoggie)

    The install went fine. I’m trying to change the settings such that all the WP files reside in the /blog directory, but loading the main page can happen from root.

    The WordPress Address: jonbonesteel.com/blog
    The Site Address: jonbonesteel.com

    As described here:

    http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory

    I followed that process and received the errors I posted.

    Thanks

    I was suggesting that it might be faster to reinstall and start over, hoping the error goes away than trying to figure out the problem.

    Thread Starter Bonedoggie

    (@bonedoggie)

    I’m sorry I am not being clear.

    The installation completed fine and all functions as designed as long as the blog is set to be run from the /blog directory.

    I wish to change the setting so that the site URL is the default.

    I follow the steps in the link, and it fails.

    A reinstall will not make any difference.

    Please comment on the error statements specifically if you have insight into them.

    Thanks much,

    Jon

    Try changing

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

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

    If this works you should change it back and use a child theme to change the function. Otherwise it will be written over on every update.

    Thread Starter Bonedoggie

    (@bonedoggie)

    The instruction on the WP site say that the subdirectory is required in the require.

    I quote –

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

    My line is:

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

    ***
    No offense, but I really don’t think you understand my issue.

    Then you should try changing that line to [edited code]

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

    I understand your issue fine. I am giving you a suggestion that has worked for others.

    If you Google Failed opening required wp-blog-header.php you will find more discussion on the problem. Perhaps something there will be of assistance.

    [edit] Lots of help at http://websitedesignerinseattle.com/2012/01/making-wordpress-blog-root-directory-keeping-directory/

    Geez, my fingers are not helping at all. It should be
    require('blog/wp-blog-header.php');

    Bonedoggie

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

    is the correct statement but it doesn’t seem to match the error message you showed you were getting.

    This shows that it’s still not accessing the blog subdirectory:

    Warning: require() [function.require]: Unable to access /www/99k.org/b/o/n/bonehome/htdocs/wp-blog-header.php in /www/99k.org/b/o/n/bonehome/htdocs/index.php on line 17

    It should be trying to access:

    /www/99k.org/b/o/n/bonehome/htdocs/blog/wp-blog-header.php

    Paste the entire code from http://jonbonesteel.com/index.php.

    Thread Starter Bonedoggie

    (@bonedoggie)

    Thank you both. That worked!

    Jon

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘WP in own directory – site specific prob’ is closed to new replies.