Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.