How to: Fix WordPress Warning: Cannot modify header information

If you try to load your WordPress blog and you come across this warning (or anything similar), the fix is really easy. The error message should look like this:

Warning: Cannot modify header information: headers already sent by: (output started at //home/htdocs/wordpress/wp-config.php:1) in /home/htdocs/wordpress/wp-login.php on line 12

Notice that the error could warn about any file, not only the wp-config and the wp-login. The solution is to edit any file that is noticed in the error message (download via ftp and edit it locally, then upload it to your wordpress directory and replace the old one, or edit it directly in your server) and remove all spaces before the <?php and after the ?>.;-)

One thought on “How to: Fix WordPress Warning: Cannot modify header information

  1. Thanks for the great support! I also face the same prob. It’s really critical portion though it’s not possible to modify header info. Anyway I like this direction, keep it up for the social networks. I think everyone benefited from this useful ideas. 🙂

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.