Support » Fixing WordPress » 200 ERROR SOLVED

  • Looks like I found the solution on a dead site thankfully cached by google… use at your own risk…

    Thanks to the long dead for the fix…

    200 OK
    The document has moved here.

    After looking at the code, I found the culprit in file wp-includes/classes.php. I commented out the line that says status_header( 200 ) and that seems to solve the 200 HTTP status problem.

    function handle_404() {
    global $wp_query;
    // Issue a 404 if a permalink request doesn’t match any posts. Don’t
    // issue a 404 if one was already issued, if the request was a search,
    // or if the request was a regular query string request rather than a
    // permalink request.
    if ( (0 == count($wp_query->posts)) && !is_404() && !is_category() && !is_search() && ( $this->did_permalink || (!empty($_SERVER[‘QUERY_STRING’]) && (false === strpos($_SERVER[‘REQUEST_URI’], ‘?’))) ) ) {
    status_header( 404 );
    } elseif( is_404() != true ) {
    // status_header( 200 );

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thanks for this. It worked perfectly. I hope that the developers pick this up and include the fix in the next update.

    Is there a script available to fix the problem with the database? Commenting the error code works, but it seems that there is a problem with the database causing this error.

    I believe this error mainly occurs with wordpress installations that have been upgraded from 1.5 to 2.0

    I’m only experiencing this at my blogs hosted at dreamhost

    has this been fixed further?

    that fix does work good, weird that they didnt fix it with 2.04

    wp sure is an adventure

    I am surprised WordPress don’t even bother commenting on this… 🙁

    WordPress probably won’t comment on it, as WordPress is a software package. While brilliant, it certainly isn’t sentient.

    Now, the WP devs may have some thoughts, but you won’t see them here too often. Granted, if you feel you’ve found a bug, you’d wander over to and enter it and get all sorts of developer attention!

    As a forum volunteer, what other sort of comment can I offer?



    I’ve just started a WordPress 2.0.4 blog on my site and have been tinkering with a template. I was dismayed to find in testing the site that if I clicked on any TrackBack link (which I guess some of my visitors might do) I got a 200 OK error.

    I was able to fix it very quickly though by using a search engine and finding this thread, so thanks for that bit of info.

    Why you want redirect?… oO
    You can use this report to display permalink, etc…

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘200 ERROR SOLVED’ is closed to new replies.