Is it possible to have Craft plugins in subfolders of craft/plugin/ instead of having them right in that folder?

So that I can have a parent directory that is my git repository craft/plugin/mypluginrepo/ containing a README.md and other files and folders besides the actual plugin craft/plugin/mypluginrepo/myplugin/.

I know you can change the plugins path via the PHP Constant:
define('CRAFT_PLUGINS_PATH', '../craft/plugins/subfolder/');

unfortunately this only allows me to set one folder.

  • I notice that some people create the repo so that it is just the plugin folder and nothing else. Which I prefer so that I can install them as a submodule in git (and gain the benefit of version tracking, autoupdates, etc). You might try just putting the readme.md file in the plugin folder itself and using that as your repo. Commented Feb 11, 2015 at 19:01

1 Answer 1


I don't think it's currently possible. There are several places where we're explicitly checking for the plugin's handle as a folder directly underneath whatever craft()->path->getPluginsPath() is returning.

  • Thanks for the info, Brad. This means all the repos structured like so on github are actually not part of a working Craft install? And cannot be tested?
    – carlcs
    Commented Feb 11, 2015 at 21:15
  • 3
    I'm not sure I'm following... it means for those you could't have the repo directly in the plugins folder. But you could have it outside the Craft install and symlink it?
    – Brad Bell
    Commented Feb 11, 2015 at 21:39
  • Oh yes, that's a good idea! Didn't know I can use symlinks with apache, Brad. Trying to get this working now (following this Stack Overflow question for the setup). Thanks again!
    – carlcs
    Commented Feb 11, 2015 at 21:58
  • This is exactly what I was looking for. I think symlinking is the correct approach. Maybe clone down all repos outside of craft into a storage directory or something. I think that should be part of the main answer. Commented Jul 26, 2016 at 18:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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