• I installed the ShadedGrey theme. The theme works fine on websage.net/wordpress but it does not work on websage.net/blog.

    It gives me the following error message:

    Warning: main(./wp-blog-header.php): failed to open stream: No such file or directory in /home/websagen/public_html/wordpress/wp-content/themes/ShadedGrey/index.php on line 3

    Warning: main(./wp-blog-header.php): failed to open stream: No such file or directory in /home/websagen/public_html/wordpress/wp-content/themes/ShadedGrey/index.php on line 3

    Fatal error: main(): Failed opening required ‘./wp-blog-header.php’ (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/websagen/public_html/wordpress/wp-content/themes/ShadedGrey/index.php on line 3

    Any idea why?

Viewing 10 replies - 1 through 10 (of 10 total)
  • Where is your WP install? in …/blog or …/wordpress?
    And if you want the install and the display in different directories, did you follow any of the guides for that?
    e.g. https://www.ads-software.com/docs/installation/different-address/

    Thread Starter websage

    (@websage)

    The WP install is in /wordpress and the content should be in /blog. I followed all the steps:

    My index.php says:

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

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

    if the two folders (blog and wordpress) are on the same level, i.e. wordpress is NOT under blog, than the above code line is not correct…

    Thread Starter websage

    (@websage)

    So, what should the correct code be, then? Both /blog and /wordpress are subdirectories of the root.

    Thread Starter websage

    (@websage)

    Can anyone help with this? The ShadedGrey theme works in the /wordpress subdirectory but I need it to work in the /blog subdirectory which has been assigned to be the URL for the blog.

    Thanks in advance,
    Mitko

    Try if this works:
    require('../wordpress/wp-blog-header.php');

    Thread Starter websage

    (@websage)

    Nothing changed:
    When you go to https://www.websage.net/wordpress/ it works; when you go to:
    https://www.websage.net/blog/ I get the following error:

    Warning: main(./wp-blog-header.php): failed to open stream: No such file or directory in /home/websagen/public_html/wordpress/wp-content/themes/ShadedGrey/index.php on line 3

    Warning: main(./wp-blog-header.php): failed to open stream: No such file or directory in /home/websagen/public_html/wordpress/wp-content/themes/ShadedGrey/index.php on line 3

    Fatal error: main(): Failed opening required ‘./wp-blog-header.php’ (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/websagen/public_html/wordpress/wp-content/themes/ShadedGrey/index.php on line 3

    From my admin’s options:

    WordPress address (URI): https://websage.net/wordpress
    Blog address (URI): https://websage.net/blog

    Take a second look to what I posted above and change it in the so-called sweet and short index.
    Or copy from here!
    It wasn’t ./ but ../

    And since this is not a WP specific question, it is time to learn about relative path (try Google)

    Thread Starter websage

    (@websage)

    OK, sorry, I was confused about which index should I change — the one in wordpress/index.php (this is where I put require(‘../wordpress/wp-blog-header.php’);
    or the one in /wp-content/themes/ShadedGrey…

    Thanks, it all works now!

    Your confusion might be caused by not reading what I posted earlier. But glad it works now.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Problem with a ShadedGrey Theme’ is closed to new replies.