WordPress: The plugin generated 1 characters of unexpected output during activation

If when activating a plugin (e.g. a plugin you’re currently writing), you get the following warning:

The plugin generated 1 characters of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.

it basically means that one of the plugin files contains a white space or an empty line at the beginning or the end of the file.

Basically you file is supposed to start with these sequence of characters:

<?php</pre> and end with this sequence of characters: [crayon lang="php"]?>

You shouldn’t have extra white spaces or empty lines before the <?php or after ?>.

Leave a Reply

Your email address will not be published.