0

I am having an error like this :

Warning: Cannot modify header information - headers already sent by (output started at /home/zk2ba8xn663w/public_html/wp-includes/formatting.php:5100) in /home/zk2ba8xn663w/public_html/wp-includes/pluggable.php on line 1219

How should i approach to solve the problem as error shows the WordPress core files?

This is the line there :

if ( !$is_IIS && PHP_SAPI != 'cgi-fcgi' )
    status_header($status); // This causes problems on IIS and some FastCGI setups

header("Location: $location", true, $status);

return true;

can if i use $location in my theme can it cause any problem? please help

  • 1
    The error isn't in WordPress core. It almost never is. The problem is that you have a theme or plugin that' throwing an error or printing output too early. – Jacob Peattie Nov 22 '18 at 13:31
  • @JacobPeattie Yeah i agree, but why does it points to pluggable.php instead of theme file or plugin file, that's what confuses me – Latheesh V M Villa Nov 22 '18 at 13:33
  • 2
    @LatheeshVMVilla somewhere in the theme or a plugin output has started before the header() call in pluggable.php, so that's when the error is triggered. Check for white space at the top and/or bottom of plugin files and functions.php in theme. – karpstrucking Nov 22 '18 at 13:51
  • Thanks :) ..it was the acf form that ends up in this error. <?php acf_form_head(); ?> form needed to placed before the <?php get_header(); ?> – Latheesh V M Villa Nov 22 '18 at 14:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.