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.

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

Sometimes you may be able to continue working on your site with this or some other error still appearing in the 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.

Leave a Reply

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

error: Content is protected !!

Pin It on Pinterest

Add address