fbpx

How to Fix Pluggable.php File Errors in WordPress

Is your WordPress website showing you a pluggable.php file error? This pluggable.php error is caused by the addition of a code snippet or activation of a new plugin on your website. This error is very puzzling and can leave you confused about how to go about fixing it. In this article, I will be discussing how to fix pluggable.php file errors in WordPress.

Cause of Pluggable.php File Errors in WordPress

WordPress allows users to perform custom settings and override some of its core functions. This can be done using code snippets and plugins. These functions can be found in the pluggable.php file.

But if the custom snippet code or plugin you used for the customization of one of these functions fails to do it correctly, then you will receive an error like this:

Warning: Cannot modify header information ‒ headers already sent by (output started at /home/username/thesite/wp-content/themes/mytheme/functions.php:128) in /home/username/thesite/wp-includes/pluggable.php on line 1210

Sometimes this error won’t stop you from working on your website.

Now let’s take a look at how to fix pluggable.php file errors in WordPress.

How to Fix Pluggable.php File Errors in WordPress

Pluggable.php file is one of WordPress core files, so editing a core file as a first option without first being sure isn’t a very good idea, regardless of what the error message says.

The error may actually be coming from another location. So first ensure the error is in the pluggable.php file before you attempt editing it and when editing, focus on the location mentioned in the error message.

Warning: Cannot modify header information ‒ headers already sent by (output started at /home/username/thesite/wp-content/themes/mytheme/functions.php:128) in /home/username/thesite/wp-includes/pluggable.php on line 1210

In the above example, the error is in the theme’s function.php file at line 128.

This means that the location of the error is in your theme’s function.php file, so you should edit it and replace or remove the code in line number 128 that’s causing the error.

At times, a simple extra space after a php?> tag can cause the headers already sent error. So you have to check for the extra space and remove it to fix the error.

Sometimes a plugin might be the cause of the pluggable.php file error. Here’s how the message will look in such a case:

Warning: Cannot modify header information ‒ headers already sent by (output started at /home/username/thesite/wp-content/plugins/name-of-plugin/plugin-example.php:134) in /home/username/thesite/wp-includes/pluggable.php on line 1123

To fix the error, simply go to the plugin (in this case plugin-example) on your WordPress indicated in the error message and deactivate the plugin to fix the pluggable.php file error. You can also contact the plugin developers and notify them of the error.

Pluggable.php file errors are mostly not caused by the files themselves, but by faulty plugins, custom snippet code, or themes that you added to the function.php file.

Leave a Reply