In your WordPress website, if you get the message :

Warning: Cannot modify header information – headers already sent by (output started at /home/username/demosite/wp-content/themes/mytheme/functions.php:1035) in /home/username/demosite/wp-includes/pluggable.php on line 1179

Then you may not be able to continue working on your website or the error may appear continuously. In most cases, the error is in the functions.php file that looks at the very bottom after the php ending ?> additional space/rules are. By making sure that after the php ending there is ?> at the very bottom are no lines and that this is the absolute end in the script the above error is solved.