How to Fix ‘Pluggable.php File’ Errors in WordPress

Published on March 25, 2019 1 min read

If you face pluggable.php file error on your WordPress site then you can follow some steps given in below to solve the error. Sometimes when you add a code snippet on your site or activate a new plugin, then you may get the pluggable.php file error. In this article, we will show you how to fix pluggable.php file errors in WordPress.

When and Why You See Pluggable.php Errors?

If WordPress allow users and plugins to override certain core functions then these functions will be located in the pluggable.php file.

When 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

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

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 which is a core WordPress file. It will not a good idea if you want to edit the core WordPress file as your first option, even when there is an error pointing to them.

Most of all, 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, we can see an example where the error is located in the theme’s functions.php file at line 1035.

That means you need to edit your theme’s functions.php file and change or remove the code which is responsible for causing this error.

In times, the headers already sent error which 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 is the error message which 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 normally caused by a custom code snippet which you added to the functions.php file, or a poorly coded plugin, or even your WordPress theme.

Simple removing or editing the code or deactivating the plugin will make the error go away.

We hope this article will help you resolve pluggable.php file errors in WordPress.

You're welcome to suggest any article to write!

Leave a Reply

Your email address will not be published. Required fields are marked *