WordPress.org

Ready to get started?Download WordPress

Forums

Can't login to the admin area - cannot modify header information errors showing (8 posts)

  1. girlswishlist
    Member
    Posted 4 years ago #

    Just tried logging in and saw this above the login:

    Warning: Cannot modify header information - headers already sent by (output started at /home/girlswi1/public_html/wp-content/themes/theme4/functions.php:14) in /home/girlswi1/public_html/wp-login.php on line 337
    
    Warning: Cannot modify header information - headers already sent by (output started at /home/girlswi1/public_html/wp-content/themes/theme4/functions.php:14) in /home/girlswi1/public_html/wp-login.php on line 349

    Then when password entered and pressed submit I just got this:

    Warning: Cannot modify header information - headers already sent by (output started at /home/girlswi1/public_html/wp-content/themes/theme4/functions.php:14) in /home/girlswi1/public_html/wp-login.php on line 337
    
    Warning: Cannot modify header information - headers already sent by (output started at /home/girlswi1/public_html/wp-content/themes/theme4/functions.php:14) in /home/girlswi1/public_html/wp-login.php on line 349
    
    Warning: Cannot modify header information - headers already sent by (output started at /home/girlswi1/public_html/wp-content/themes/theme4/functions.php:14) in /home/girlswi1/public_html/wp-includes/pluggable.php on line 690
    
    Warning: Cannot modify header information - headers already sent by (output started at /home/girlswi1/public_html/wp-content/themes/theme4/functions.php:14) in /home/girlswi1/public_html/wp-includes/pluggable.php on line 691
    
    Warning: Cannot modify header information - headers already sent by (output started at /home/girlswi1/public_html/wp-content/themes/theme4/functions.php:14) in /home/girlswi1/public_html/wp-includes/pluggable.php on line 692
    
    Warning: Cannot modify header information - headers already sent by (output started at /home/girlswi1/public_html/wp-content/themes/theme4/functions.php:14) in /home/girlswi1/public_html/wp-includes/pluggable.php on line 890

    Now I can't access the admin area and have no clue what I've done or how I've managed to mess it up. Any help you can give me would be massively appreciated!

  2. Shane G.
    Member
    Posted 4 years ago #

    Hi,

    It is usually due to spaces, new lines, or other garbage at opening/closing PHP file <?php tag or after a closing ?> tag in wp-config.php. It can be other file too so need to check error message as it may list file name where the error occurred.

    One can either upload error file from the backup or edit erroneous file. To edit the file one need to check below mentioned points:

    1. Download the file mentioned in the error message.

    2. Open that file in a plain text editor

    3. Check that the very first characters are <?php

    4. Check that the very last characters are ?>

    5. Place the cursor between the ? and >

    6. Now press the DELETE key on your computer and keep that key pressed for at least 15 seconds.

    7. Now type > and

    8. Save without pressing any other key at all.

    That’s it!

    Thanks,

    Shane G.

  3. girlswishlist
    Member
    Posted 4 years ago #

    Hi Shane G,

    I did as you suggested to both the functions.php and the wp-login.php but sadly it hasn't fixed the issue. I've looked for the ?> at the end of pluggable.php but there isn't one at the end of this. Could this be the issue?

    Thanks

    Hayley

  4. esmi
    Forum Moderator
    Posted 4 years ago #

    Try looking in functions.php.

  5. girlswishlist
    Member
    Posted 4 years ago #

    This is my functions.php:

    <?php
    if ( function_exists('register_sidebar') ){
        register_sidebar(array(
            'name' => 'leftsidebar',
            'before_widget' => '',
            'after_widget' => '',
            'before_title' => '<h4>',
            'after_title' => '</h4>',
        ));
    
    }
    ?>
  6. esmi
    Forum Moderator
    Posted 4 years ago #

    Get rid of the closing ?> tag.

  7. kertoon
    Member
    Posted 3 years ago #

    How do I download the file mentioned in the error message?

  8. andreavegan
    Member
    Posted 3 years ago #

    Hi there

    I am having the same problem except my error message mentions services.php

    How do I find the code for services.php as girlswishlist found the code for functions.php?

    Thanks

Topic Closed

This topic has been closed to new replies.

About this Topic