0

I'm working on my first theme from scratch. So far so good. Locally with XAMPP everything works fine. I uploaded my theme to my FTP Server. Now I get a Whitescreen after publishing/editing a post. I have no plugins except Hello Dolly and a Coming Soon Plugin (which I tested, they work fine with other themes). Also other themes seem to work fine, no problems here. So I assumed it has something to do with my functions.php. So I cleared it entirely since a theme does no necessarily need it. It still does not work. In my debug.log file it says:

Warning: Cannot modify header information - headers already sent by (output started at ../wp-content/themes/inital/functions.php:2) in ../wp-admin/post.php on line 197

Is this the reason it's not working? How can I fix it?

Thanks for any help.

Wordpress Version 4.8.1

closed as off-topic by Michael, Jack Johansson, Howdy_McGee Aug 18 '17 at 3:59

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions that are too localized (such as syntax errors, code with restricted access, hacked sites, hosting or support issues) are not in scope. See how do I ask a good question?" – Michael, Jack Johansson, Howdy_McGee
If this question can be reworded to fit the rules in the help center, please edit the question.

1

MY first guess is to look at the functions.php referenced in the error message for any whitespace (space character) at the top of the file. Hard to find, but extra space characters output before any output will cause that error.

I always make sure that the <?php is at the very very top, and never worry about the closing ?> at the end of a php file, because sometimes inadvertant space characters can be introduced by mistake.

Not the answer you're looking for? Browse other questions tagged or ask your own question.