Congratulations! 😍 As a blog reader, get a 10% OFF on WP Frontend Delete Account PRO. Use coupon code WPFDA10OFF.

Have you ever worked on your local environment – looks fine, and then your live server produces the following error?

    Warning Cannot modify header information – headers already sent by…

This usually happens because output buffering is often enabled in the local environment, while most servers disable output buffering.

You should disable output buffering by going to php.ini file and comment the line that reads something like this:

; output_buffering = 4096

After making this change, reload your local environment.

That’s all. The error now will appear on your localhost as well. Fix the error now and deploy. Happy developing! 🙂

In case it helps, here’s how to fix the “Headers already sent” error on WordPress. If you have any questions or are confused about how to fix the issue, let me know in the comments.

“Headers already sent” warning doesn’t appear on localhost
Tagged on:

Sanjeev Aryal

Don't bury your thoughts, put your vision into reality ~ Bob Marley.

Leave a Reply

Your email address will not be published. Required fields are marked *