Do plugin files have to follow a specific convention to be “picked up” by WordPress?

WordPress detects a file as plugin when there is a plugin header. So you can store multiple plugins in one directory, and they all will be recognized as different plugins.

Each file with at least /* Plugin Name: something */ is a plugin.

The reason is that WordPress scans all PHP files in the main directory of a plugin.

You can use any name for the plugin file. Avoid non-plugin files in the main directory. They just eat runtime. Put all other PHP files into sub-directories.

Leave a Comment