WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I remember - many moons ago - debugging a plugin that I was building for a very, very, long time. The only thing that fixed my issue (which I can't remember for the life of me), was to name the plugins main file (the one with the plugin header) the exact same name as the plugins folder.

Since then, I have never named the plugin file anything other than the name of the folder. Is this necessary for any core functionality to work, or am I just being superstitious?

share|improve this question

Simple answer, NO.

The plugin file can be named anything you want as long as at the very top of it you include the plugin Meta (name, description. ...)

share|improve this answer
But if a plugin has several php files, how does Wordpres know which is the "main php file" ? Just by looking for the plugin meta header in all files? – leonbloy Feb 14 '12 at 17:39
@leonbloy that is correct. – Bainternet Feb 14 '12 at 20:48

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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