How to Solve Warning Cannot modify header information by WordPress Error

Don’t be scared and worry so much if you have encountered a very scary warning while doing something in your WordPress website like this:

Warning: Cannot modify header information – headers already sent by (output started at /home/myadmin/public_html/wp-content/themes/yourtheme/custom/custom_functions.php:1) in /home/myadmin/public_html/wp-login.php on line 362


in /home2/myadmin/public_html/wp-includes/pluggable.php on line 691

Because such error is common to website builders and newbies using WordPress. It is something we encounter when we are editing or adding something in the layout.css or custom function php in our themes or either inside wp-content.

When I encountered that error, I couldn’t even log out of my WordPress admin page. And boy, I was worried. Trying to find the solution for it, I searched from Wordpess support and forums only to find same tips and advice which didn’t work for me. It may have fixed a part, but still there were more alerts that appeared.

I tried deleting the extra white spaces or lines via Filezilla FTP because I don’t want to edit directly through my custom editor in WordPress.

What may have caused this error?

  • This error is caused by an extra white space or line in the opening or closing wp-config file or at the exact error in the warning message.
  • This error may also be caused by improperly editing of css file inside your wp-content resulting from adding a file inside it or editing something without overwriting it.

How to fix this warning?

It is so easy to fix this problem. It is best to start a clean slate again right? These are the ways you can do to solve this error. Choose one or try each one until you finally solved the problem.

  • Delete your newly installed plug-in. Refresh your mind and think of anything you have added, edited and installed inside your website and delete it via FTP. Once deleted, clear all your cahe in your browser. Reload your admin. If there were no errors, you have solved it.
  • Go over to the line (line 362 from the example error above) and find the extra spaces and clear them all. Refresh your admin to see if it is fine now. If not, correct all the errors by going to the lines specified one by one.
  • Delete the theme you have installed causing all the warnings to clear all errors in one move. Then just re-install the Theme. That’s simple.

Add Comment

Pin It on Pinterest

Sharing Gives More Blessings

Share this post with your friends!