“Warning: Cannot modify header information – headers already sent” WordPress Error

Warning: Cannot modify header information – headers already sent by….

That showed up at some point while surfing your website? That means there is a conflict in the PHP code you have for your WordPress site. This can be caused by a few things. They, sadly, are often tedious and stupid. They can be :

Your PHP coding has blank space in it

Did you recently edit a PHP file? As stupid as it sounds, you have to remove as much possible white space in the coding as you can. Make sure there are absolutely no spaces in the first line before your very first

<?php ?>

Usually your functions.php file in your WordPress Theme directory will contain a lot of PHP. It’s the first place I’d check. I’d also check comments.php and archive.php files.

Your file editor is encrypting the syntax wrong

There is a chance your file editor is using an improper encryption during the editing process. Check to make sure it’s UTF-8, no ANSI, or anything else.

Disable PHP error debugging

This should be used as a last resort, but if you’re still receiving errors, you can simply turn them off. Find your .htaccess file within your WordPress directory (whether theme or root) and place this within it :

error_reporting(E_ERROR); 

This tells your server to stop reporting back PHP errors. Like I said, I strongly suggest you do this last.

Hope any of these help!

1 Comment

  • Exciting layout in your blog. I truly appreciated perusing it as well as I’ll be back again to read through a lot more while in the upcoming.

Leave A Comment

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