Support » Fixing WordPress » Warning: Cannot modify header information – NEED HELP !!

  • Resolved Ghorri

    (@ghorri)


    Hello everyone ,

    I was trying to add some code lines to functions.php , all of a sudden i found my website showing this message -> ( Warning: Cannot modify header information – headers already sent by (output started at /home/nmmarwan/public_html/app/wp-includes/functions.php:1) in /home/nmmarwan/public_html/app/wp-includes/pluggable.php on line 1195 )

    I tried to edit the functions.php & pluggable.php files by removing spaces .. but the problem is still there , i’m desperatly in need of someone’s help , please help .

    These are the lines 1193 to 1198 from my pluggable.php file :

    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;
    }
    endif;

Viewing 3 replies - 1 through 3 (of 3 total)
  • Don’t edit WordPress core files! That’s a quick way to ruin a WordPress install!

    Always do code customizations through custom plugins, custom themes, or child themes. That way if something goes bad, you can just disable the plugin/theme and fix the code before re-enabling it, all this without taking down your WordPress site. This also avoids plugin, theme and core updates overwriting your customizations.

    Next, use a version control system (git, Mercurial, SVN, etc.) when you do code edits. Commit often. Then when things go bad, you can just revert to a known working state of your code and try again.

    So back to the problem at hand – replace your core edited files with ones from a fresh WordPress download.

    Next, replace your “functions.php” file with the one that originally came with the theme. You should now be back to where you first started before trying to edit the functions.php file or WordPress core files.

    Did you edit your theme functions.php file or the one in the wp-includes folder when you discussed this previous issue:

    https://wordpress.org/support/topic/remove-dashboard-link-from-users-top-bar?replies=3

    ?

    Please also see:

    https://codex.wordpress.org/FAQ_Troubleshooting#How_do_I_solve_the_Headers_already_sent_warning_problem.3F

    Thread Starter Ghorri

    (@ghorri)

    Thank you for your help guys Pioneer Web Design & bemdesign , I really appreciate it .

    I Replaced my actual functions.php & pluggable.php , with other ones from a fresh installation of WordPress , and the problem was solved 😀 .

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Warning: Cannot modify header information – NEED HELP !!’ is closed to new replies.