6

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?

8

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. ...)

  • 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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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