Are you seeing a pluggable.php file error on your WordPress site? Sometimes when you add a code snippet on your site or activate a new plugin, you may get the pluggable.php file error. In this article, we will show you how to fix pluggable.php file errors in WordPress.
When and Why You See Pluggable.php Errors?
WordPress allow users and plugins to override certain core functions. These functions are located in the pluggable.php file.
If a WordPress plugin or a custom code snippet fails to correctly handle one of these functions, then you will see an error like this one:
Warning: Cannot modify header information – headers already sent by (output started at /home/username/demosite/wp-content/themes/mytheme/functions.php:1035) in /home/username/demosite/wp-includes/pluggable.php on line 1179
Sometimes you may be able to continue working on your site with this or some other error still appearing in the admin area.
Having said that, let’s take a look at how to easily fix pluggable.php file error in WordPress.
Fixing Pluggable.php File Errors in WordPress
The pluggable.php file is a core WordPress file. It’s never a good idea to edit the core WordPress file as your first option, even when there is an error pointing to them.
Most likely than not, the error is coming from a different location.
In order to fix any error mentioning pluggable.php file, just look at the first location mentioned in the error.
Warning: Cannot modify header information – headers already sent by (output started at /home/username/demosite/wp-content/themes/mytheme/functions.php:1035) in /home/username/demosite/wp-includes/pluggable.php on line 1179
In the above example, the error is located in the theme’s functions.php file at line 1035.
This means you need to edit your theme’s functions.php file and change or remove the code causing this error.
Sometimes the headers already sent error is caused by an extra space after closing the php ?> tag, so you can just remove that, and it will fix the issue.
Let’s take a look at another example:
Warning: Cannot modify header information – headers already sent by (output started at /home/username/demosite/wp-content/plugins/some-plugin-name/some-plugin.php:144) in /home/username/demosite/wp-includes/pluggable.php on line 1090
This error message is pointing to a plugin on your WordPress site causing the error. You can simply deactivate the plugin and notify the plugin author about the error.
In almost all cases, errors mentioning pluggable.php file are not caused by the file itself.
These errors are usually caused by a custom code snippet you added to functions.php file, or a poorly coded plugin, or even your WordPress theme.
Simply removing or editing the code or deactivating the plugin will make the error go away.
Still can’t figure out what’s causing these errors?
Follow instructions in our step by step guide for troubleshooting WordPress errors. It will help you find out the cause of the error and how to quickly fix it.
We hope this article helped you resolve pluggable.php file errors in WordPress. You may also want to bookmark our list of most common WordPress errors and how to fix them.
If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.
You always with the solutions!!! Thank you
Glad our guide could help you
Hi, Thanks for the insight. I had a similar error preventing me from logging into my admin area. The page was just blank.
Warning: Cannot modify header information
I followed your instruction on case one, removing a space after the PHP closing tag and it worked out for me
Glad our guide was able to help
It fixed the problem in no time. Thanks.
You’re welcome, glad our guide was helpful
Yes! That fixed it very quickly for me and right in the middle of a launch. Thank you!
You’re welcome, glad our guide was able to assist
Thanks a lot. I have been struggling for an hour to fix this issue. Now it is fixed.
You’re welcome, glad our article was helpful
Thanks for the tip! It solved my problem.
You’re welcome, glad our guide could help
Nice tutorial, Its solve my issue.
Glad our guide was able to help
I can’t log in to my admin page at all. I know exactly how to fix it, but I can’t log in. How can I access my page if it won’t let me log in through the WordPress login page?
It would depend on the error, for some workarounds when you’re unable to log in you can take a look at our article here: https://www.wpbeginner.com/beginners-guide/beginners-guide-to-troubleshooting-wordpress-errors-step-by-step/
Thanks for this useful information. I just followed your guide and was able to fix the error. Indeed, am grateful.
I was about to lose my mind trying to figure out what was wrong, and that extra space was all it was! Thank you thank you thank you!
Glad our article could help you find the problem
Same here!
It was driving me crazy…. All it was was the first blank line above the <?php in my customizer.php file…..
ughhhh…….
thank you WPBeginner Editorial Staff !!!
Thank you! saved me hours of scouring for a fix
Its helped me
Woo, thanx for saving me hours! A space in line 1, just before <…
Yes, same situation here! Thanks SO much Syed, you have just saved me HOURS!!
This article is super helpful and actually resolved the error on my wordpress install. It was additional space in functions.php.
Thanks a lot team. Keep up the great work.
Thanks for the help!
It was an extra space at the end of plugin.
This step worked for me..
“Sometimes the headers already sent error is caused by an extra space after closing the php ?> tag, so you can just remove that, and it will fix the issue.”
Thanks a lot for the help.
i am gettin error like this can you tell me reason for this and how to solve
Hi, I see a message like that. I was trying to update my theme when the message appeared. The problem is that the message blocks the access to my dashboard. I mean, it doesn’t even allow me to log in to my dashboard anymore!!! what can I do? this is the message: Warning: Cannot modify header information – headers already sent by (output started at /home3/angelasobral/public_html/wp-content/themes/glowline/inc/static-function.php:238) in /home3/angelasobral/public_html/wp-includes/pluggable.php on line 1210
Thank you so much for your help
Hi Angela,
Your theme is causing this issue. Please see our guide on how to fix pluggable.php file errors in WordPress.
Angela, I am having the exact same issue! I cannot follow their steps to fix as I cannot log in. Did you ever find a fix?
Thank you very much for the really helpful article. I faced an error occuring in my website because of the Comment Code just after PHP start tag <?php
something like this…
/*
Plugin Name: Some Name
Plugin URI:
Description: Some Description
Author: Author Name
Author URI:
Version: 2.1
*/
I removed comment part and it solved my problem.
Thanks a lot for the help.
Thank you! The extra space after the closing tag solved my problem!
This just solved my problem.
Thanks a lot
How you solved it
Thanks for the help..it helped me a lot!
THANK YOU SO MUCH! my programmer left an extra space before AND after the <php? tag. now it works just fine!
Thank you information about this error. I need complete guide on how split post into pages
thank you! is really help me . and its damn worked!
Ah that empty space after ?> closing tag…. Never would have guessed it. Thank you sir! You saved me a lot of time and frustration.
Developing a plugin, and added the wp_safe_redirect call to the plugin. Getting an ‘function wp_safe_redirect’ not found error.
I think this is because pluggable.php is not loaded until *after* the plugin. Is this correct, and how do I fix it?
Thanks.
This error is killing me! I deactivated the plugins and it is got the site up but I can’t access the admin area. Getting this:
Warning: Cannot modify header information – headers already sent by (output started at /home/content/f/i/n/finmadden/html/wp-includes/class-walker-page.php:1) in /home/content/f/i/n/finmadden/html/wp-includes/pluggable.php on line 1179
any thoughts?
Please try our steps mentioned in our WordPress troubleshooting guide. Most likely this error is caused by a theme or a plugin on your website.
is your problem solved ? then kindly help me