Edit: Since publishing I’ve discovered that AddToAny have pushed a release that sorts out the issue described here. That was quick.

I’ve just been gifted a blog topic for the day. As I went to log into WordPress I got the following message:

Cannot modify header information – headers already sent by…

This message usually happens when a WordPress plugin contains some bad code. In this case it looks as though the problem is with the Add-to-any plugin. That plugin adds some social sharing buttons into the bottom of each post.

Because the problem stopped me from getting into my site’s backend I wasn’t able to use the built-in WordPress plugin manager to deactivate the plugin. Instead I deleted all the plugin files using my FTP client and that’s fixed the problem.

It may be unfair for me to blame Add-to-any 100 percent. There’s a possibility that the problem was caused by a conflict with the WPSuperCache plugin. In any case now that I’ve deleted Add-to-any I’ll wait a few days and then reinstall the plugin. It’s only a few minute operation, which is one of the things I love about WordPress.

What it does highlight is the importance of keeping plugins to a minimum and using only the best. Add-to-any is a great plugin – as is WPSuperCache but this is software we’re dealing with and there’s always a chance of human error in building the code. Another reason to keep the number of plugins to a minimum is that it reduces maintenance time. Every new plugin means another lot of maintenance and upgrades and there’s always a chance that one of those upgrades will go south as it appears has happened in this case.

For the geeks amongst us  here’s the error messages the plugin threw up.

Warning: Cannot modify header information - headers already sent by (output started at deleted/wp-content/plugins/add-to-any/services.php:2) in deleted/wp-login.php on line 337

Warning: Cannot modify header information - headers already sent by (output started at  deleted/wp-content/plugins/add-to-any/services.php:2) in deleted/wp-login.php on line 349

Warning: Cannot modify header information - headers already sent by (output started at  deleted/wp-content/plugins/add-to-any/services.php:2) in deleted/wp-includes/pluggable.php on line 690

Warning: Cannot modify header information - headers already sent by (output started at  deleted/wp-content/plugins/add-to-any/services.php:2) in deleted/wp-includes/pluggable.php on line 691

Warning: Cannot modify header information - headers already sent by (output started at  deleted/wp-content/plugins/add-to-any/services.php:2) in deleted/wp-includes/pluggable.php on line 692

Warning: Cannot modify header information - headers already sent by (output started at  deleted/wp-content/plugins/add-to-any/services.php:2) in deleted/wp-includes/pluggable.php on line 890

Share this Post