Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Cup
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

How to Fix Pluggable.php File Errors in WordPress

Running into pluggable.php file errors in WordPress can be confusing and frustrating, especially if you’re not sure what’s causing them. These errors usually happen due to conflicts with your themes, plugins, or custom code snippets.

At WPBeginner, we’ve been working with WordPress for over 16 years. During this time, we’ve run into countless errors, meaning that we have a few tricks up our sleeves for solving them.

In this article, we will show you how to easily fix pluggable.php file errors in WordPress. Our method is beginner-friendly and will work for you even if you are not a coding expert.

Fix errors in pluggable.php file in WordPress

When and Why Do You See Pluggable.php Errors?

WordPress allows 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

Example of an error in WordPress mentioning pluggable.php file

Sometimes, you may be able to continue working on your WordPress website with this or some other error still appearing in the admin area.

In the screenshot below, you can see an example of an error message inside the WordPress dashboard.

Error in WordPress admin area

Having said that, let’s take a look at how to easily fix the pluggable.php file error in WordPress.

How to Fix 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 it.

More likely than not, the error is coming from a different location.

In order to fix any error mentioning the 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 just 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 that is causing the error. You can simply deactivate the plugin and notify the plugin author about the error.

In almost all cases, errors mentioning the pluggable.php file are not caused by the file itself.

These errors are usually caused by a custom code snippet you added to the functions.php file, 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?

You can follow the 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 fix it quickly.

Expert Tip: Constantly running into errors on your WordPress website? Our WPBeginner Maintenance Services can constantly monitor your website to make sure it’s up to date and functioning correctly.

We also offer on-demand, one-off fixes. Check out our Premium WordPress Support Services for more information!

Bonus: Use WPCode to Insert Code Snippets in WordPress

Inserting custom code into your functions.php file can sometimes cause pluggable.php file errors and other WordPress errors. In the worst-case scenario, the code snippet can even break your website.

That’s why we recommend using WPCode instead. It’s the best WordPress code snippets plugin that allows you to add custom code to your website without breaking it.

WPCode - Best WordPress Code Snippets Plugin

First, you will need to install and activate the WPCode plugin. For detailed instructions, see our tutorial on how to install a WordPress plugin.

Upon activation, visit the Code Snippets » + Add Snippet page from the WordPress dashboard. Here, you can click the ‘Use Snippet’ button under the ‘Add Your Custom Code (New Snippet)’ option.

You can also use the premade code snippets that are a part of the WPCode library.

Add a new code snippet in WPCode

This will open the ‘Create Custom Snippet’ page, where you can add a name for the code snippet. After that, you can select the code type from the dropdown menu on the right.

Next, add the custom code into the ‘Code Preview’ box and toggle the ‘Inactive’ switch to ‘Active’.

Save the code snippet

Finally, click the ‘Save Snippet’ button to store your settings. You have now successfully added custom code to your website.

For more details, you can see our guide on how to easily add custom code in WordPress.

We hope this article helped you resolve pluggable.php file errors in WordPress. You may also want to bookmark our list of the most common WordPress errors and how to fix them and see our expert picks for the best code editors for editing WordPress files.

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.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us. Here's our editorial process.

Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit - a collection of WordPress related products and resources that every professional should have!

Reader Interactions

51 CommentsLeave a Reply

  1. Dennis Muthomi

    I’d like to share from my experience: when dealing with “headers already sent” errors, it’s also worth checking for any unexpected output before the opening php tag in your theme or plugin files. Even a single space or newline character can trigger these errors.

    You recommenfing to use WPCode for adding custom code snippets is excellent advice.
    I’ve found that using a WPCode not only helps prevent errors but also makes it easier to manage and organize custom code across a site. It’s a great way to enhance WordPress functionality without risking the stability of the site.

  2. Rinto

    I am very new to WordPress development, and this post guide me on the right way about the pluggable functions.

    • WPBeginner Support

      Glad our guide could help you fix errors with Pluggable.php :)

      Admin

  3. Khyati

    I can’t thank you enough , you always be a Rockstar, bless you man.

    • WPBeginner Support

      Glad our guide was helpful :)

      Admin

  4. Anthony Camilo

    You always with the solutions!!! Thank you

    • WPBeginner Support

      Glad our guide could help you :)

      Admin

  5. Larry Donald

    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

    • WPBeginner Support

      Glad our guide was able to help :)

      Admin

  6. Komal Wadhwa

    It fixed the problem in no time. Thanks.

    • WPBeginner Support

      You’re welcome, glad our guide was helpful :)

      Admin

  7. Gabby Conde

    Yes! That fixed it very quickly for me and right in the middle of a launch. Thank you!

    • WPBeginner Support

      You’re welcome, glad our guide was able to assist :)

      Admin

  8. Karthikeyan

    Thanks a lot. I have been struggling for an hour to fix this issue. Now it is fixed.

    • WPBeginner Support

      You’re welcome, glad our article was helpful :)

      Admin

  9. Marc

    Thanks for the tip! It solved my problem.

    • WPBeginner Support

      You’re welcome, glad our guide could help :)

      Admin

  10. Pardeep kumar

    Nice tutorial, Its solve my issue.

    • WPBeginner Support

      Glad our guide was able to help :)

      Admin

  11. Stephanie Tognetti

    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?

  12. Sixtus

    Thanks for this useful information. I just followed your guide and was able to fix the error. Indeed, am grateful.

  13. Perrin Brunson

    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!

    • WPBeginner Support

      Glad our article could help you find the problem :)

      Admin

    • Shane

      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 !!!

  14. Richard

    Thank you! saved me hours of scouring for a fix :)

  15. Jacek

    Its helped me :-)

  16. Torben

    Woo, thanx for saving me hours! A space in line 1, just before <…

    • Jelena

      Yes, same situation here! Thanks SO much Syed, you have just saved me HOURS!!

  17. Dave CJ

    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.

  18. David Usma

    Thanks for the help!

    It was an extra space at the end of plugin.

  19. James

    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.”

  20. elham

    Thanks a lot for the help.

  21. suraj

    i am gettin error like this can you tell me reason for this and how to solve

  22. angela

    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

  23. Vijay Patel

    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. :)

  24. Anneliese

    Thank you! The extra space after the closing tag solved my problem!

  25. Mubarak

    This just solved my problem.

    Thanks a lot

    • zeshan

      How you solved it

  26. Prashant Gupta

    Thanks for the help..it helped me a lot!

  27. Deborah

    THANK YOU SO MUCH! my programmer left an extra space before AND after the <php? tag. now it works just fine!

  28. prathapreedy

    Thank you information about this error. I need complete guide on how split post into pages

  29. Imam Nurrahmat

    thank you! is really help me . and its damn worked!

  30. Matty R

    Ah that empty space after ?> closing tag…. Never would have guessed it. Thank you sir! You saved me a lot of time and frustration.

  31. RickH

    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?

  32. Jason Teale

    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?

Leave A Reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.