Are you trying to resolve the pluggable.php file error in WordPress?
The wp-includes/pluggable.php error is a pesky issue you can run into while working on WordPress sites. It’s one of those things you hope to never see but can cause some major headaches when you do.
Most commonly, this occurs when you toggle on a theme or plugin, but you can also encounter pluggable.php errors whenever you try to add code snippets.
In this article, I’ll explain to you how to troubleshoot this error.
What Causes Pluggable.php Errors?
Basically, the cause of pluggable.php errors is the possibility that a new function may not be able to override the default WordPress permissions or functions.
The pluggable.php is one of the core WordPress files, which means there is something else (most likely a plugin or a code snippet) that is conflicting with the natural behavior of this file.
Although the error occurs quite rarely, it has strong consequences when it does. The Pluggable.php error will break your site, causing a white screen of death and inaccessibility to your site’s backend or frontend.
How Does a Pluggable.php File Error Look?
Some of WordPress’ core functions can be overridden by users or plugins. These functions can be found in the pluggable.php file.
Typically, you’ll see an error message that reads something like this:
Warning: Cannot modify header information – headers already sent by (output started at /home/username/mysite/wp-content/themes/mytheme/functions.php:103) in /home/username/mysite/wp-includes/pluggable.php on line 892
How to Manually Troubleshoot Pluggable.php Errors
First Rule: Don’t Edit Core Files
Though your instinct might tell you to edit the wp-includes/pluggable.php file, that’s a big no-no. Instead, check where the error originates, usually in your theme’s
For example, you can locate the error in the functions.php file on line 103, not in the pluggable.php file.
Your theme’s functions.php file needs to be edited and the code that caused this error needs to be replaced or removed.
A stray space after the PHP closing tag (
?>) can often trigger this issue. Eliminating this extra space usually fixes the error.
Note that, this error can also come from a plugin conflicting with the pluggable.php file.
Warning: Cannot modify header information – headers already sent by (output started at /home/username/mysite/wp-content/plugins/plugin-name/blabla.php:122) in /home/username/mysite/wp-includes/pluggable.php on line 892
Usually you can solve this by deactivating the plugin and letting the plugin’s author know about the error.
Errors related to pluggable.php are almost never caused by the file itself.
Fixing pluggable.php with WP Umbrella plugin
WP Umbrella is a plugin to manage, maintain and monitor multiple WordPress websites. This plugin allows you to track PHP errors generated by theme and plugin.
Once, installed and connected, go to WP Umbrella dashboard and click on the PHP error tab.
From here, you will retrieve all the PHP errors generated by theme and plugins on your website.
Once again, There should be no editing of the pluggable.php file since it is part of the WordPress core files! Luckily, the error messages describe which plugin or theme files are conflicting with pluggable.php as well as which line of code.
Once identified, click on the pluggable.php related errors to get extra information that will help you to troubleshoot it. If you are not able to fix the error yourself, you can just deactivate the plugin or send the information to the plugin/theme’s support.
Final Thoughts & Conclusion About The Pluggable.php
The pluggable.php error is the perfect illustration that you should try to install the fewest number of plugins possible on your website.
Most of the plugin and theme available on WordPress directory are of course safe and will not break your website.
However, each time you plug something new on your website you increase the amount of PHP requests to be processed by your server.
This might increase your page loading times and open security breach on your website.
The best way to identify plugins that spam your website is to monitor it with a solution like WP Umbrella.
Frequently Asked Questions About Pluggable.php
The pluggable.php file in WordPress contains a list of functions that can be overridden by users or plugins.
No, it’s not advisable to edit wp-includes/pluggable.php or any core WordPress files.
You can use plugins like WP Umbrella to monitor PHP errors, including those related to pluggable.php.