I recently committed version 2 of my new plugin to the Plugin Directory, but now when you install the plugin for the first time, you get this error on activation: "The plugin does not have a valid header."

alt text

You can workaround it by browsing to the plugin section of wp-admin and activating from there with no errors, but this is still not ideal.

As far as I can tell, the header looks fine, and is pretty much the same as version 1.0. Which leave me to wonder why I get this error?

Here is the plugin: http://wordpress.org/extend/plugins/export-to-text/

5 Answers 5


From what you write, it looks to me that you accidentially copied/tagged the whole /trunk directory in your SVN while tagging/branching. As the wordpress plugin directory just grabs the full directory that got tagged, the zip package was invalidated.

You can recover from that. I once made the same mistake. Just do a full checkout on your local machine in another directory (not the working copy in which you develop your plugin). That check downloads everything, the current trunk and all tags.

Then go inside the tags directory and locate the tag in which you accidentially created the mess. SVN-Delete it and commit that change. You probably can revert the accidental change as well, but I think deleting the directory of the concrete tag is more straight forward.

Next time you tag your plugin, tag the working copy and not the trunk directory.

If you're using SVN on the commandline:

Tags - Chapter 4. Branching and Merging

If you're using Tortoise SVN:

Branching / Tagging - Chapter 4. Daily Use Guide


It seems you have some issue with folder structure, fresh install (or download) of your plugin has following:

export-to-text/trunk/[plugin files]
export-to-text/[plugin files]

The trunk copy seems like an error and is what likely messes up WP scanning for plugin files.

  • Not entirely sure what that means, or how to fix it? I tried re-committing, but no joy.
    – jnthnclrk
    Nov 12, 2010 at 14:50
  • Ah, looks like I have another copy of trunk in tags/. See here: plugins.svn.wordpress.org/export-to-text/tags/1.1 . I wonder how I should delete that?
    – jnthnclrk
    Nov 12, 2010 at 14:54
  • @trnsfrmr sorry, I am weak with version control. You should probably uncheck my answer as accepted so someone who is better with that takes a look.
    – Rarst
    Nov 12, 2010 at 15:00
  • 1
    OK, do a local SVN update of your plugin, clean out the extra directories, then force an SVN commit of the cleaned version. This should remove the extra directories from the repository version and restore things to working order.
    – EAMann
    Nov 12, 2010 at 18:42

After checking the plugin package (1.1), something else popped into my eyes in the readme:

Requires at least: 3.01 Tested up to: 3.01

I do not know if this is causing the error, but probably you should write 3.0.1 (see the dot between 0 and 1).


I had the exact same error before and I was not using any kind of version control when I faced the issue. But I will just go ahead and tell you what solved the problem for me and it might actually help you.

The problem for me was the IDE I was using. It was inserting a blank invisible char just before the PHP opening tag. Problem solved by trying a different IDE which is the regular notepad :)


That error generally occurs when it's missing one of the key header fields WP requires. Always include a name, author, URL, author URL, description, and version.

  • Plugin in question seems to have all of these in order. btw plugin name is the only field that is actually technically required, rest are obviously good practice to include, but optional.
    – Rarst
    Nov 12, 2010 at 22:10
  • this should be a comment, not an answer Mar 19, 2018 at 13:06
  • @roberthuttinger: No idea how it is nowadays, but I'm pretty sure that at the time this answer was written, most if not all of the fields that made WP trigger this error occur are enumerated in this answer. Mar 19, 2018 at 13:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.