Warning Require wp-blog-header.php Failed To Open Stream
*Danger Will Robinson! Danger!*
If you’re not used to poking at the very guts of your host this post is not for you.
Infact its mostly just for me to document how I just corrected a issue on my VPS server tonight that may be affecting others.
99.99% odds that if you’re a regular reader of this blog, this post does not apply to you!
Okay so lets get down to the nuts and bolts!
Original Problem
It began with seeing a ton of these while doing: tail -f of the apache error logs. (Connecting to the VPS via putty)
On hostgator VPS that would be:
command: tail -f /usr/local/apache/logs/error_logs
[Wed Aug 11 02:43:32 2010]
[client 000.000.000.00] Premature end of script headers: index.php
So Bobby keenly suggested I run php against index.php and find out why it was dying.
Testing PHP on index.php Core WordPress File
command: php /home/username/public_html/index.php
Output:
Warning: require(./wp-blog-header.php): failed to open stream: No such file or directory in /home/username/public_html/index.php on line 17
Warning: require(./wp-blog-header.php): failed to open stream: No such file or directory in /home/username/public_html/index.php on line 17
Fatal error: require(): Failed opening required ‘./wp-blog-header.php’ (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/username/public_html/index.php on line 17
To this, Bobby replies: <bad pirate accent> Thar be yerr problem lass </bad pirate accent>
So Whats Up With wp-blog-header.php?
wp-blog-header.php is a core 3.0 file and contains
<?php /** * Loads the WordPress environment and template. */
if ( !isset($wp_did_header) ) {
$wp_did_header = true;
require_once( dirname(__FILE__) . ‘/wp-load.php’ );
wp();
require_once( ABSPATH . WPINC . ‘/template-loader.php’ );
} ?>
So that didn’t prove useful.
More Head Scratching about wp-blog-header.php
So we speculated that perhaps the php was not configured to properly use relative paths on the host.
So I opened a copy of index.php.
Commented out: /** require(‘./wp-blog-header.php’); */
Added (right before php closing): require(‘/home/username/public_html/wp-blog-header.php’);
Renamed old index.php to index-clean.php, then saved and uploaded the altered index.php copy.
Success!
That solved that error. The same error could also show up if the blog is appearing on yoururl.com but actually installed to /public_html/wordpress instead of in the root. Unfortunately any update that replaces index.php will require re-doing this.
I’m a little concerned about how many other things may be broke if the host isn’t handling the relative addressing correctly. I’ll contact them. However I didn’t see any other errors that appear related to that, so it may be a non-issue.
This issue was occuring (sorta) “silently” and not showing in the cpanel error logs. I was only seeing it from the VPS apache logs. It may be far more common than we know since so few people can look at those logs.
Here’s some related threads I found on this topic, simply for reference in case I didn’t include enough info here: Link 1, Link 2
This file or pathing is not new to 2.9.2 so I can not call it a wordpress bug, more like an issue at the host level. Since I own the VPS I can likely get this fixed. However, someone on shared hosting or even reseller hosting may not be able to so I’m providing this workaround.
That’s all folks! Hope it helps someone!
Happy WordPressing!
Kimberly
Keep up with all the latest social marketing changes and news to accelerate your business!
- WordPress, Facebook, Twitter, & Google+
- Social Marketing
- List Building & Affiliate Marketing


[...] the original here: Troubleshooting WordPress Warning Require wp-blog-header.php Failed To Open Stream Tags: core, hostgator, php, [...]
[...] This post was mentioned on Twitter by purplehayz, Kimberly Castleberry and Kimberly Castleberry, BethHewitt80. BethHewitt80 said: RT @@Ask_Kim just-ask-kim.com Troubleshooting WordPress Warning Require wp-blog-header.php Failed To Open Stream http://is.gd/edA8Q [...]
Super tutorial kim. Many users get nightmares when they see errors

Mani Viswanathan invites you to read…Apple Peel allows you to convert your iPod into an iPhone
I am on of those people who really hate to see some errors while blogging. Thank you so much for this solution, it will really help me a lot when I will encounter that problem again.
Thanks for sharing this great guide Kim. I’m also having a problem with my WordPress blog and I found out were having the same sentiments. The links you’ve shared were quite useful too.
As far as I know if error occur in your wordpress plugin web, you might place some error code during the editing. If you just install plugin try to uninstall it and reinstall it if there still problem there might come from the plugin that you just install =)
After 14 hours of troubleshooting, you have solved my problem. Thank you so much for documenting it. Whew. Oh, and I’m using 3.0.1, so it’s still a problem in later versions.
Yay Lee!! I’m glad it helped! It’s certainly the most common thing to blog on so I wasn’t sure if anyone else would run into it. Thanks for letting me know it helped and that unfortunately the issue still exists. Appreciate it!
Kimberly
Oh my god. Thank you so much for publishing this.
I’ve literally been looking all over the net for a solution to this. And I had no idea it was to be found on this blog. Thank you once again, and keep up the good work! ;D
/ Nabil
I got this error, but my site was hacked maybe. My half of the wordpress files and folders were missing including wp-config. Now hope that it will recover…
Adnan invites you to read…Apple iPad 3: Photos and Expected Features