Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialKristjan Reinsberg
50,960 PointsERROR - Launching a WordPress Site
I was following tutorail
- Launching a WordPress Site -> How to Migrate a Local WordPress Site to Live Server
... so at 08:35 where you try to log in.. .. i enter my url....http://kristjan.eu/wp-admin/ And get error like : (nothing is displayed except this error )
Warning: Cannot modify header information - headers already sent by (output started at /data05/virt37173/domeenid/www.kristjan.eu/htdocs/wp-content/themes/kristjan/functions.php:1) in /data05/virt37173/domeenid/www.kristjan.eu/htdocs/wp-includes/pluggable.php on line 876
ANY idea how to solve it ?
Kristjan Reinsberg
50,960 PointsOK that was interesting.... Everything was ok... Seems like file was corrupted or so...
I took similar functions.php file and inserted block by block the site code... Everything worked... :D .. i had text editor open, filezilla open... etc.... maybe it some program made some changes with file....
CASE CLOSED, PROBLEM TERMINATED :P
3 Answers
Zac Gordon
Treehouse Guest TeacherYes, extra white space or lines at the top of the functions.php file will cause header issues. Were you able to get your own code back into the functions.php file?
Bonnie B
3,494 PointsIf it happens again, look for extra spaces or blank lines or anything else before an opening php tag or after a closing php tag.
Kristjan Reinsberg
50,960 PointsIt was not even empty space. Did triple check.. File file got currupted ...
Enyway .. PROBLEM SOLVED :)
Kristjan Reinsberg
50,960 PointsKristjan Reinsberg
50,960 PointsOK found a "solution".. i replaced functions.php in my theme folder... with a a random functions.php file from another site... everything seems to work...
Googled the problem... it happens often...
Narrowing down the problem reasons... Update-ing post when found the root of evil :D