WordPress Headaches with Closing HTML Tag – Any Ideas?

Update: I finally fixed this issue based on a shot in the dark, hail mary attempt. I will blog about it more next week. For now, suffice to say this kind of thing makes me want to buy and colo my own server.


You may have noticed this site was down all day yesterday.

After about 5 hours of troubleshooting I’ve narrowed it down to either a WordPress issue, or a DreamHost issue.

Closing HTML Tag Killer
I know how to fix the problem: If I go into footer.php and remove the closing HTML tag the home page and single post display work…if I add it back they crash (500 error – when I look in the error log the message is “Premature end of script headers: php5.cgi”).

But the weirdest part is that I haven’t touched the blog, aside from publishing a couple new posts, in weeks. So for this to start suddenly means something else must have changed.

RSS Also Down
Although I hate the idea, I was considering leaving it without a closing HTML tag for the weekend and coming back to it after the holiday since browsers are very forgiving about not having a closing HTML tag. However, I noticed my RSS feed is also down, and when I remove the closing RSS tag the feed works in my browser, but FeedBurner chokes on it.

So I actually have to solve this problem. I’ve tried everything I can think of but haven’t made any progress in the last few hours.

404 Works
The last piece of information is that the 404 page works whether or not the closing HTML tag is in place. But when I copy the 404 page code into the index or single post template, it still crashes. So it seems like the content of the index and single post page don’t matter that much, although if I remove all of the content from these pages they do load fine.

Add to this the fact that the site stopped working very suddenly at 9 in the morning and it seems to me this is either a DreamHost issue or I’ve been hacked.

Any ideas are appreciated…

If you’re a WordPress guru and want to take a crack at fixing it I have no trouble compensating you for your time. Please email me at rob@softwarebyrob.com.

Start Small, Get Big
Growth Secrets for Self-Funded Startups. It'll Change Your Life.
What you get for signing up:
  • A 170-page ebook collecting my best startup articles from the past 5 years
  • Previously unpublished startup-related screencasts
  • Exclusive revenue-growing techniques I don't publish on this blog
"The ideas and information Rob provides should be required reading for anyone that wants to create a successful business on the web." ~ Jeff Lewis
Startups for the Rest of Us...
If you're trying to grow your startup you've come to the right place. I'm a serial web entrepreneur here to share what I've learned in my 11 years as a self-funded startup founder. Luckily several thousand people have decided to stick around and join the conversation.

For more on why you should read this blog, go here.


#1 David on 11.29.08 at 8:27 pm

I remember when something like that happened to me a year ago. I documented my situation here: http://dblume.livejournal.com/84753.html

If you’ve been hacked, it may only display the hack correctly if the user-agent pretends to be the Google crawler. Spoof that, and see if the page renders the same as you’d expect.

#2 Arnie on 11.30.08 at 6:17 pm

Have you considered installing WordPress on your machine (or a VM), restoring the content database and testing locally to see if the issues are caused by your hosting provider?

#3 Martin Beeby on 12.02.08 at 5:03 am

I’d be happy to set up a c# BlogEngine Site for you and you can kiss the pains of wordpress goodbye. Heck i’ll even theme it so it look exactly the same as this one.

#4 Problems (Sort of) Resolved with WordPress and DreamHost | Software by Rob on 12.03.08 at 5:20 pm

[…] ← WordPress Headaches with Closing HTML Tag – Any Ideas? […]