Organising the plugins folder in wordpress

I generally like to use a root folder structure to organise my code files. Is there a way that I can organise my WordPress plugins folder to organise my plugins?

I am looking to have two folders, contrib and custom;

  • custom having all the custom plugins that I have written
  • contrib having all the contributed plugins which either I have
    purchased or downloaded from the community.

It seems you can move the whole plugin directory, but not really alter the structure within.

Does anyone have an idea of how to achieve that? Currently I am just prefixing my custom plugins so that they come up together in a directory view.

2 Answers
2

WordPress has quite narrow expectation for plugin directory structure. It is tightly coupled with loading process and API functions.

While I know attempts have been made to make it more flexible, I am not aware of any real breakthroughs or mainstream adoption.

As of current state of core I would estimate you would waste more time trying to implement it, than save time benefiting from more elaborate folder structure. Personally I make any “groups” of plugins or theme and plugins on IDE projects level.

For trivia themes on other hand are much more flexible in this regard and core allows to register arbitrary additional directories containing them.

Leave a Comment