Solution for “The plugin generated x characters of unexpected output during activation”
- Article
- Comment (2)
Solution for “The plugin generated x characters of unexpected output during activation” is very simple. Most of the time, we face such unavoidable errors and warnings to disturb you while coding. The most Irritating error for me is ” If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.”.
Lets move to our topic. In certain situations, we need to install a plugin, which is necessary at the moment. But while installing the plugin or theme, it shows an error ” The plugin generated XXX characters of unexpected output during activation.
Problem behind the error is nothing.
Open the plugin main file and and after the closing php tag . I mean after the end tag ” ?>” you are unecessarily added some blank space. Which is generating the error there.
Also one another reason for the error. On your plugin main file, you have plugins info in comments. If that lines have any white space after every sentence, which generates these type of errors. so just remove the blank spaces and save it.
Than deactivate the plugin and activate again. That’s it.
can you please give me source code
For such an errors, I can’t provide code. and also these issues occur, if your PHP version is 5.6 . The recent version of PHP. you can go on without issues.