Wordpress Blog Header Slowness Problem Fix

Yes the blog header, when included in other pages (non-wordpress pages) can REALLY slow down your page loading.

However, the problem was not what I thought it was — the system querying the database for the WP configuration information, and then subsequently executing my own scripts. It always seemed just a little TOO slow for this to be the problem.

In another (what I thought was unrelated) search, I was looking for why I was getting 404 headers being served from all of my pages, that were non-wordpress, but included that pesky wp-blog-header.php file.

Turns out that the old wp-blog-header is a freakin megalomaniac. It wants everything. It was the one sending 404 headers out for my pages that were non-wordpress. This effectively killed my google indexing for pages.

On top of that, it WAS SLOWING THE SYSTEM DOWN when rendering that header, doing extra processing.

Now that that is fixed, my non-wordpress pages render about 3 times as fast.

Hallelujah, Praise be to Allah Krishna Jesus and the cast of ‘That 70s Show’.

Here is a link I found detailing a good fix:

http://trac.wordpress.org/ticket/2984

and thanks to these dudes for telling me about it!

Basically the code, in whatever file that includes the header, should look like something like this (mind the paths):

<?php
define(’WP_USE_THEMES’, false) ;
require(’../../../wp-blog-header.php’); // i’m in wp-content/themes/js.php
header(”HTTP/1.1 200 OK”); // else we get 404
header(”Status: 200 All rosy”) ; // what should this really say?
?>

Tags: , , , , , ,

Jay Harley is the CEO and web architect of Heaven Interactive. As a technologist, Jay specializes in creating business productivity software and offering clients high-level media consulting services. Before founding Heaven Interactive, Jay led a double life as a web consultant and MFA New Media instructor at the Academy of Art University in San Francisco. At AAU, he enthusiastically developed several courses in web application design and scripting, and enjoyed daily interaction with design students, offering guidance, support, and camaraderie as a media professional. Jay is now squarely focused on providing Web 3.0 solutions to businesses in the form of collaboration and presentation software, by utilizing the power of the "Web as a Platform."



Leave a Reply

You must be logged in to post a comment.