A Technology Blog
Tech

What causes 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 do you see Pluggable.php Errors?

With WordPress users can override certain core functions and plugins can do that as well. These functions are located in the pluggable.php file.

If a custom code snippet or WordPress plugin 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:103) in /home/username/demosite/wp-includes/pluggable.php on line 117

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

So let’s take a look at how to easily fix pluggable.php file error in WordPress.

How to Fix Pluggable.php File Errors in WordPress

The pluggable.php file is a core WordPress file. Editing the core WordPress file should not be your first option, even if there is an error pointing to them.

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 103.

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/random-plugin-name/random-plugin.php:14) in /home/username/demosite/wp-includes/pluggable.php on line 109

This error message is pointing to a plugin on your WordPress site that is causing the error. You can simply deactivate the plugin and let the plugin author know 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.

The post What causes Pluggable.php File Errors in WordPress appeared first on Online Shouter.

Source: onlineshouter

Leave a Reply

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