If you’re getting header errors, try deleting empty spaces in your functions file

If you’re getting header errors, try deleting empty spaces in your functions file

Have you ever gotten that nasty error that looks a little something like this: “Warning: Cannot modify header information – headers already sent by” etc etc. ? This is usually an easy fix.

We want to thank one of our Twitter followers, Michael Kuhlmann (@mfgmk) , for reminding us of this tip:

Try deleting empty spaces in your functions file. You may have added them accidentally, it may be an error in the theme you’re using, or perhaps your FTP client added them. Just delete the extra spaces before and after the opening and closing PHP tags:

FREE EBOOK
Your step-by-step roadmap to a profitable web dev business. From landing more clients to scaling like crazy.

By downloading this ebook I consent to occasionally receive emails from WPMU DEV.
We keep your email 100% private and do not spam.

FREE EBOOK
Plan, build, and launch your next WP site without a hitch. Our checklist makes the process easy and repeatable.

By downloading this ebook I consent to occasionally receive emails from WPMU DEV.
We keep your email 100% private and do not spam.

<- Extra Space ->
<?php
// Your functions code....

?>
<- Extra Space ->

Want to Submit a Daily Tip to WPMU DEV?

If you’ve got a great tip for WordPress, WordPress Multisite, or BuddyPress users, send it our way on Twitter: @wpmudev and we’ll happily credit you. Create a tweetable title and let us know if you have more info or an article you’d like to link it to.

Tags: