8 replies
I was trying to add code to my functions.php, I deleted it, but now I when I go to my wordpress admin panel I get this message

Warning: Cannot modify header information - headers already sent by (output started at /home/paul11/public_html/mysitename.com/wp-content/themes/atahualpa/functions.php:982) in/home/paul11/public_html/mysitename.com/wp-includes/pluggable.php on line 881

Site loads ok, just cannot get into wordpress admin, any ideas?
#error #wordpress
  • Profile picture of the author tweakr
    Seems like you might have missed some of your added in code in the functions file.

    Looks like something is included in the functions file that is trying to add headers to the output, headers should be the first thing sent if you're going to send custom headers.
    {{ DiscussionBoard.errors[6813013].message }}
  • Profile picture of the author topnichewebsites
    look for any missed code you addeed and any extra space at the end of the file.
    Signature
    http://pixelcovers.com/ <- eBook add eCovers

    https://www.unicommercesolutions.com <- WordPress Websites and Maintenance
    {{ DiscussionBoard.errors[6813558].message }}
  • Profile picture of the author lamai66
    i have removed the code, and I have also added in an original Functions.php file but no joy!!
    {{ DiscussionBoard.errors[6813689].message }}
  • Profile picture of the author lamai66
    Got it working, deleted the code and saved and then added code in again and saved and all working now thanks
    {{ DiscussionBoard.errors[6813765].message }}
    • Profile picture of the author mbwani
      this error often occurs when you try to install plugin and then delete that after sometime, but now you have got the job and next time take care.
      {{ DiscussionBoard.errors[6816652].message }}
  • Profile picture of the author rajeevrla
    This is not a common problem, but if happen can make you mad. It happened to one of my clients, I had to delete all the blank spaces after the PHP code to make it work again. This is not a Wordpress issue but a simple PHP error.
    Signature

    Have a great day!

    {{ DiscussionBoard.errors[6832400].message }}
  • Profile picture of the author Altin
    Just for your information if this similar thing happens again in the future: this error typically happens when you have left spaces before opening the <?php code or after closing php code (?>)
    Just remove these unnecessary spaces and it should be ok. When you "removed the code and added it again" you probably did just this; removed some of these spaces. I learned it the hard way so maybe this may help anyone else who reads here.

    Another way to solve this would be to add ob_start(); and ob_flush(); in the beginning and at the end of your code respectively.
    {{ DiscussionBoard.errors[6833244].message }}
  • Profile picture of the author Jeremy Lebre
    A trick: never put an end tag (?>) at the end of a PHP file.
    {{ DiscussionBoard.errors[6839875].message }}

Trending Topics