In wordpress many times we receive an error “can’t modify header information , Header already sent”. Today i will explain the reasons and fixes for this error .

Why This Error
The reason behind this error is if wp_redirect() or wp_safe_redirect() is used after the page headers have already been sent. This essentially means that something is calling for a redirect on a hook that fires too late in the loading order.Any function that sends or modifies HTTP headers must be invoked prior to any output otherwise as you’ve seen it will fail.

It means Your theme is printing output (text) to the browser, but then for some reason WordPress is redirecting the user (with wp_redirect) away from that page before the whole page is rendered. You can’t start printing output and then redirect, or you’ll get the error you see.

Warning: Cannot modify header information – Header already sent by (Output started at /blog/wp-config.php:34)

Fixes For this Error
To fix this error you need to follow some steps.
1) Check if there is a white space at start or end of your file .If there is a blank space then remove all the space before and after the php tags
Remove_Space_from_wp-config

Or go to the last line of file where you see any blank space after php tag ?>
fix-cannot-modify-header-information-headers-already-sent-error

2) Alternatively you can add this script in your theme’s functions.php Or Plugin’s file .

add_action('init', 'do_output_buffer');
function do_output_buffer() 
{
     ob_start();
}
http://codingbin.com/wp-content/uploads/2016/10/headers-already-sent-1024x662.jpghttp://codingbin.com/wp-content/uploads/2016/10/headers-already-sent-150x150.jpgManoj DhimancmsWordPressIn wordpress many times we receive an error 'can't modify header information , Header already sent'. Today i will explain the reasons and fixes for this error . Why This Error The reason behind this error is if wp_redirect() or wp_safe_redirect() is used after the page headers have already been sent....coding, php, wordpress, yii, cakephp, and  jquery

Are you want to get implementation help, or modify or extend the functionality of this script? Submit paid service request