Tuesday, March 26, 2013

How to fix 500 internel server error doring Wordpress Installation


Fix No-1
If you are getting error 500 (Internal Server Error) while posting a comment, it’s likely due to how WordPress is programmed to handle internally raised errors/messages. By default WordPress responses with code 500 to the server. Some servers show their own error 500 page and prevent WordPress from displaying the intended message.
The workaround…
Edit file wp-includes/functions.php
In newer versions of WordPress replace
function _default_wp_die_handler( $message, $title = '', $args = array() ) {
       $defaults = array( 'response' => 500 );
with
function _default_wp_die_handler( $message, $title = '', $args = array() ) {
//      $defaults = array( 'response' => 500 );
        $defaults = array( 'response' => 200 );
In older versions of WordPress replace in function wp_die
status_header(500);
or
status_header( 500 );
with:
status_header(200);

No comments:

Post a Comment