Warning: Cannot modify header information (can't log in)

Hi,

The site has been working fine but the other day when trying to log in, it came up with a white screen that says:

Warning: Cannot modify header information - headers already sent by (output started at /var/sites/b/businessinfopoint.co.uk/public_html/wp-content/themes/xpro-child/functions.php:1) in /var/sites/b/businessinfopoint.co.uk/public_html/wp-includes/pluggable.php on line 1210

I couldn’t log in at all but then the following day it worked fine again. Now it’s showing the same error and there’s no way for me to log into the site.

I have tried following the advice looking at other topics on the forum but I can’t seem to solve it. There doesn’t appear to be any issues with the functions.php code and I tried removing the additional functions but that didn’t make any difference.

I don’t think I’ve installed any new plugins recently but I can’t log in to find out if that’s what’s causing the problem.

Please could you take a look?

Many thanks
James

Hi James,

Thanks for writing in. Everything on the site looks fine. As that’s a warning and not an error it shouldn’t actually break anything. To hide it’s output open up your wp-config.php and replace the WP_DEBUG define with the following:

ini_set('display_errors','Off');
ini_set('error_reporting', E_ALL );
define('WP_DEBUG', false);
define('WP_DEBUG_DISPLAY', false);

The issue itself (the warning) is coming from your child themes custom code, you may find this article/tutorial of some use: http://www.wpbeginner.com/wp-tutorials/how-to-fix-pluggable-php-file-errors-in-wordpress/

Thanks!

Hi Jack

Thanks, yes the site seems to be functioning fine but I can’t access the admin area at all. I have just tried making the change as suggested. Now I get a blank, white screen with no warning message but still no way to log in unfortunately.

Many thanks
James

Hi There,

Would you mind providing us with login credentials(by clicking on the Secure Note button at the bottom) so we can take a closer look? To do this, you can make a post with the following info:

  • Link to your site
  • WordPress Admin username / password
  • FTP credentials

Thanks.

Hi

I have saved the details above.

Many thanks
James

Hi James,

When I check again, I am able to login to your admin already. There’s no error anymore:

Hi Lely

That’s strange because it still doesn’t work right for me. I seem to be able to circumvent it and get access but it’s not fixed. I also have issues with making changes. If I try and add a new post, or update anything I’m left with a blank screen and have to hit the back button.

It’s definitely not right still and I don’t know what the issue is.

Many thanks
James

I also can’t upload a featured image to a post. It comes up with the dialog box but it just keeps spinning as if it’s trying to load the media but never does.

Thanks
James

It’s definitely not fixed. I tried disabling all the plugins to see if that was the issue but it didn’t resolve it. Every time I tried to reinstall a plugin I got the same message:

Warning: Cannot modify header information - headers already sent by (output started at /var/sites/b/businessinfopoint.co.uk/public_html/wp-content/themes/xpro-child/functions.php:1) in /var/sites/b/businessinfopoint.co.uk/public_html/wp-includes/pluggable.php on line 1210

They did work again but there is obviously an issue. I asked my hosting provider to look into it and they said it was an issue with the theme.

Please could you advise as it’s causing issues and I’m not able to complete a post without being able to upload a featured image.

Many thanks
James

Hi there,

Based on that Warning, the culprit is the child theme’s functions.php on line 1, but there is nothing on that line one. And yes, the admin is blank on my end too and there is no error message either, I wonder where you add those lines that disable warning and error message, it’s not in wp-config.php. I also enabled debug.log with no effect either, is it correct FTP credentials? Or which folder your site is installed? I intentionally added an error but there is no effect either so I wonder if I’m checking the correct installation files.

Thanks!

Hi Rad

I did add those lines to the config file but it didn’t solve the problem (I just got a blank screen instead of a warning message) so I removed them again.

The FTP credentials are correct as you can see the custom code installed in the Child theme.

Do you have any thoughts? It was working correctly and then I go the warning messages out of the blue.

Many thanks
James

Hey James,

Upon checking your wp-admin in your site, I see a blank/white screen. There are many factors that caused issues in your site.

First, I renamed your plugins folder to plugins-bak to disable them all.

After doing that, I these errors from your caching plugin and child theme was displayed.

I commented out the caching plugin’s line in your wp-config and that removed the error from the caching plugin.

Now I was left with the child theme error so I removed all of the additional functions in your functions.php. Your original functions.php, I renamed to functions.php.bak.

After I did that, I can now log in to your wp-admin.

I see additional items that could cause issues. I see you still have X and X Pro in your themes so I removed them.

The issue was not caused by Pro but several third party factors caused it. Please rename the plugins-bak to plugins and activate your plugins. If the issue persists, you need to completely uninstall your caching plugin. You need to contact the caching plugin developer for this.

Thanks.

Excellent!!!

Thanks very much for your help, I have reactivated my plugins and so far there seems to be no issues at all.

James

Glad to hear it’s working for you now!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.