WPBeginner

Beginner's Guide for WordPress

  • Blog
    • Beginners Guide
    • News
    • Opinion
    • Showcase
    • Themes
    • Tutorials
    • WordPress Plugins
  • Start Here
    • How to Start a Blog
    • Create a Website
    • Start an Online Store
    • Best Website Builder
    • Email Marketing
    • WordPress Hosting
    • Business Name Ideas
  • Deals
    • Bluehost Coupon
    • SiteGround Coupon
    • WP Engine Coupon
    • HostGator Coupon
    • Domain.com Coupon
    • Constant Contact
    • View All Deals »
  • Glossary
  • Videos
  • Products
X
☰
Beginner's Guide for WordPress / Start your WordPress Blog in minutes
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
Recommended
WordPress Plugins
View all Guides

WPBeginner» Blog» Tutorials» How to Fix Pluggable.php File Errors in WordPress

How to Fix Pluggable.php File Errors in WordPress

Last updated on December 15th, 2016 by Editorial Staff
113 Shares
Share
Tweet
Share
Pin
Free WordPress Video Tutorials on YouTube by WPBeginner
How to Fix Pluggable.php File Errors in WordPress

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.

Fix errors in pluggable.php file 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

Example of an error in WordPress mentioning pluggable.php file

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

Error in WordPress 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.

113 Shares
Share
Tweet
Share
Pin
Popular on WPBeginner Right Now!
  • How to Properly Move Your Blog from WordPress.com to WordPress.org

  • Revealed: Why Building an Email List is so Important Today (6 Reasons)

    Revealed: Why Building an Email List is so Important Today (6 Reasons)

  • Google Analytics in WordPress

    How to Install Google Analytics in WordPress for Beginners

  • How to Fix the Error Establishing a Database Connection in WordPress

    How to Fix the Error Establishing a Database Connection in WordPress

About the Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi. Trusted by over 1.3 million readers worldwide.

The Ultimate WordPress Toolkit

46 Comments

Leave a Reply
  1. Anthony Camilo says:
    Jan 7, 2021 at 5:19 pm

    You always with the solutions!!! Thank you

    Reply
    • WPBeginner Support says:
      Jan 8, 2021 at 9:39 am

      Glad our guide could help you :)

      Reply
  2. Larry Donald says:
    Dec 2, 2020 at 10:41 pm

    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

    Reply
    • WPBeginner Support says:
      Dec 3, 2020 at 10:23 am

      Glad our guide was able to help :)

      Reply
  3. Komal Wadhwa says:
    Mar 25, 2020 at 4:59 pm

    It fixed the problem in no time. Thanks.

    Reply
    • WPBeginner Support says:
      Mar 26, 2020 at 11:13 am

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

      Reply
  4. Gabby Conde says:
    Feb 26, 2020 at 1:14 pm

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

    Reply
    • WPBeginner Support says:
      Feb 27, 2020 at 8:45 am

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

      Reply
  5. Karthikeyan says:
    Feb 17, 2020 at 10:50 pm

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

    Reply
    • WPBeginner Support says:
      Feb 18, 2020 at 8:41 am

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

      Reply
  6. Marc says:
    Feb 12, 2020 at 8:46 pm

    Thanks for the tip! It solved my problem.

    Reply
    • WPBeginner Support says:
      Feb 13, 2020 at 8:47 am

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

      Reply
  7. Pardeep kumar says:
    Dec 7, 2019 at 2:55 am

    Nice tutorial, Its solve my issue.

    Reply
    • WPBeginner Support says:
      Dec 9, 2019 at 11:43 am

      Glad our guide was able to help :)

      Reply
  8. Stephanie Tognetti says:
    Oct 31, 2019 at 3:57 pm

    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?

    Reply
    • WPBeginner Support says:
      Nov 1, 2019 at 9:52 am

      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/

      Reply
  9. Sixtus says:
    Sep 19, 2019 at 2:13 am

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

    Reply
  10. Perrin Brunson says:
    Jan 8, 2019 at 1:38 pm

    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!

    Reply
    • WPBeginner Support says:
      Jan 9, 2019 at 11:02 am

      Glad our article could help you find the problem :)

      Reply
    • Shane says:
      Oct 6, 2019 at 5:41 pm

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

      Reply
  11. Richard says:
    Jan 7, 2019 at 6:51 am

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

    Reply
  12. Jacek says:
    Sep 3, 2018 at 7:16 am

    Its helped me :-)

    Reply
  13. Torben says:
    May 17, 2018 at 8:21 am

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

    Reply
    • Jelena says:
      Nov 9, 2018 at 12:40 pm

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

      Reply
  14. Dave CJ says:
    Mar 24, 2018 at 5:13 pm

    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.

    Reply
  15. David Usma says:
    Mar 20, 2018 at 12:56 pm

    Thanks for the help!

    It was an extra space at the end of plugin.

    Reply
  16. James says:
    Dec 12, 2017 at 1:00 am

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

    Reply
  17. elham says:
    Nov 28, 2017 at 1:16 am

    Thanks a lot for the help.

    Reply
  18. suraj says:
    Sep 30, 2017 at 2:55 pm

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

    Reply
  19. angela says:
    Sep 21, 2017 at 2:57 am

    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

    Reply
    • WPBeginner Support says:
      Sep 21, 2017 at 11:36 pm

      Hi Angela,

      Your theme is causing this issue. Please see our guide on how to fix pluggable.php file errors in WordPress.

      Reply
    • Amanda C says:
      Dec 2, 2017 at 10:59 pm

      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?

      Reply
  20. Vijay Patel says:
    Sep 17, 2017 at 10:04 pm

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

    Reply
  21. Anneliese says:
    Sep 13, 2017 at 1:13 pm

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

    Reply
  22. Mubarak says:
    Jul 31, 2017 at 5:10 pm

    This just solved my problem.

    Thanks a lot

    Reply
    • zeshan says:
      Aug 16, 2017 at 2:48 am

      How you solved it

      Reply
  23. Prashant Gupta says:
    Jun 24, 2017 at 8:48 am

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

    Reply
  24. Deborah says:
    Jun 7, 2017 at 9:04 pm

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

    Reply
  25. prathapreedy says:
    May 30, 2017 at 9:30 am

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

    Reply
  26. Imam Nurrahmat says:
    May 13, 2017 at 7:27 am

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

    Reply
  27. Matty R says:
    Apr 14, 2017 at 1:35 pm

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

    Reply
  28. RickH says:
    Feb 7, 2017 at 2:28 pm

    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?

    Reply
  29. ML says:
    Jan 26, 2017 at 9:16 am

    Thanks.

    Reply
  30. Jason Teale says:
    Jan 26, 2017 at 8:05 am

    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?

    Reply
    • WPBeginner Support says:
      Jan 26, 2017 at 1:17 pm

      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.

      Reply
    • haris says:
      Aug 29, 2017 at 12:48 pm

      is your problem solved ? then kindly help me

      Reply

Leave a Reply Cancel 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.

Over 1,320,000+ Readers

Get fresh content from WPBeginner

Featured WordPress Plugin
WP Mail SMTP logo
WP Mail SMTP
Fix WordPress email delivery issues. #1 SMTP plugin. Learn More »
How to Start a Blog How to Start a Blog
I need help with ...
Starting a
Blog
WordPress
Performance
WordPress
Security
WordPress
SEO
WordPress
Errors
Building an
Online Store
Useful WordPress Guides
    • 7 Best WordPress Backup Plugins Compared (Pros and Cons)
    • How to Fix the Error Establishing a Database Connection in WordPress
    • Why You Need a CDN for your WordPress Blog? [Infographic]
    • 30 Legit Ways to Make Money Online Blogging with WordPress
    • Self Hosted WordPress.org vs. Free WordPress.com [Infograph]
    • Free Recording: WordPress Workshop for Beginners
    • 24 Must Have WordPress Plugins for Business Websites
    • How to Properly Move Your Blog from WordPress.com to WordPress.org
    • 5 Best Contact Form Plugins for WordPress Compared
    • Which is the Best WordPress Popup Plugin? (Comparison)
    • Best WooCommerce Hosting in 2020 (Comparison)
    • How to Fix the Internal Server Error in WordPress
    • How to Install WordPress - Complete WordPress Installation Tutorial
    • Why You Should Start Building an Email List Right Away
    • How to Properly Move WordPress to a New Domain Without Losing SEO
    • How to Choose the Best WordPress Hosting for Your Website
    • How to Choose the Best Blogging Platform (Comparison)
    • WordPress Tutorials - 200+ Step by Step WordPress Tutorials
    • 5 Best WordPress Ecommerce Plugins Compared
    • 5 Best WordPress Membership Plugins (Compared)
    • 7 Best Email Marketing Services for Small Business (2020)
    • How to Choose the Best Domain Registrar (Compared)
    • The Truth About Shared WordPress Web Hosting
    • When Do You Really Need Managed WordPress Hosting?
    • 5 Best Drag and Drop WordPress Page Builders Compared
    • How to Switch from Blogger to WordPress without Losing Google Rankings
    • How to Properly Switch From Wix to WordPress (Step by Step)
    • How to Properly Move from Weebly to WordPress (Step by Step)
    • Do You Really Need a VPS? Best WordPress VPS Hosting Compared
    • How to Properly Move from Squarespace to WordPress
    • How to Register a Domain Name (+ tip to get it for FREE)
    • HostGator Review - An Honest Look at Speed & Uptime (2020)
    • SiteGround Reviews from 4196 Users & Our Experts (2020)
    • Bluehost Review from Real Users + Performance Stats (2020)
    • How Much Does It Really Cost to Build a WordPress Website?
    • How to Create an Email Newsletter the RIGHT WAY (Step by Step)
    • Free Business Name Generator (A.I Powered)
    • How to Create a Free Business Email Address in 5 Minutes (Step by Step)
    • How to Install Google Analytics in WordPress for Beginners
    • How to Move WordPress to a New Host or Server With No Downtime
    • Why is WordPress Free? What are the Costs? What is the Catch?
    • How to Make a Website in 2020 – Step by Step Guide
Deals & Coupons (view all)
Advanced Coupons
Advanced WooCommerce Coupons
Get 50% off the Advanced Coupons smart coupons plugin for WooCommerce.
ProfilePress
ProfilePress Coupon
Get 20% OFF on ProfilePress WordPress ultimate user and profile plugin.
Featured In
About WPBeginner®

WPBeginner is a free WordPress resource site for Beginners. WPBeginner was founded in July 2009 by Syed Balkhi. The main goal of this site is to provide quality tips, tricks, hacks, and other WordPress resources that allows WordPress beginners to improve their site(s).
Join our team: We are Hiring!

Site Links
  • About Us
  • Contact Us
  • FTC Disclosure
  • Privacy Policy
  • Terms of Service
  • Free Blog Setup
  • Free Business Tools
Our Sites
  • OptinMonster
  • MonsterInsights
  • WPForms
  • SeedProd
  • Nameboy
  • RafflePress
  • Smash Balloon

Copyright © 2009 - 2021 WPBeginner LLC. All Rights Reserved. WPBeginner® is a registered trademark.

Managed by Awesome Motive | WordPress hosting by SiteGround | WordPress CDN by MaxCDN | WordPress Security by Sucuri.