2

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.

0

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.

0

You can't change the wordpress plugins folders-structure its a flat structure (all plugin folders are under ../wp-content/plugins/) if you want to group plugins together for easy of use have a look at the plugin https://en-gb.wordpress.org/plugins/plugin-organizer/ it allows for grouping of plugins itself.

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.