Are you trying to resolve the pluggable.php file error in WordPress?
The pluggable.php error is one of the more puzzling errors you can run with WordPress.
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.
Basically, the cause of pluggable.php errors is the possibility that a new function may not be able to override the default WordPress 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 and inaccessibility to your site’s backend or frontend.
In this article, I’ll explain to you how to troubleshoot this error.
Table of contents
Some of WordPress’ core functions can be overridden by users or plugins. These functions can be found in the pluggable.php file.
This error appears if a plugin or snippet fails to handle one of the functions correctly:
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
The pluggable.php file is a core WordPress file. When you have an error pointing to a WordPress core file, it’s NEVER a good idea to edit it first.
The error is most likely coming from a different location.
To fix any pluggable.php file error, look for the first reference to it in the error message.
In the above example, the error can be found in the functions.php file of the theme, 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.
It can happen that an extra space following a php ?> tag causes the headers already sent error. So just remove that extra space and the error will go away in most situations.
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.
WP Umbrella is a plugin to manage, maintain and monitor WordPress websites. This plugin allows you to track PHP errors generated by theme and plugin.
Once, installed and connected, go to WP Umbrella dashboard.
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.
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.
The 500 internal server error on WordPress is probably one of the worst you can get because your entire site is down. The 500 internal server errors are very often the consequence of an error in the PHP code.
Step-by-step guide on how to fix the 502 bad gateway error in WordPress.
In this article, I’ll show you how to easily turn off PHP errors in WordPress.