FIX!">WordPress plugin generated unexpected output during activation — FIX!

You are here because as a Word­Press plu­gin developer you are exper­i­en­cing the fol­low­ing error:

The plu­gin gen­er­ated 8 char­ac­ters of unex­pec­ted out­put
dur­ing activ­a­tion. If you notice “head­ers already sent” mes­sages,
prob­lems with syn­dic­a­tion feeds or other issues, try deac­tiv­at­ing or
remov­ing this plugin.

I solved the issue by doing the following…

Some­where in my php file that pro­duces the admin page I closed the php tags, then had a few empty lines and then I opened my php tags again. This caused an out­put of 8 unex­pec­ted char­ac­ters. To be a bit more clear it looked like this:


// code here...

<!-- these white spaces caused the problem -->


// code here...


So basic­ally all you need to do is to remove all your empty white spaces in your code, deac­tiv­ate your plu­gin (if you haven’t done so already) and activ­ate it again.

If this error can be caused by some other issues please let me know about it in the com­ments.
I hope that helped anyone.

Categories: PHP, WordPress Tags: , ,
  1. July 21st, 2013 at 16:24 | #1

    Thank for this post.This is exactly the answer.:) Keep rockzz

  1. No trackbacks yet.