I have been creating a lot of code in the past few months for my Drupal 6 website and have since created about 20 modules of code that all pretty much go together.

I know we can group modules together in a folder, but am wondering what impact this will have if I do this on already deployed modules.

Is it possible for me to simply create a new folder in the sites/all/modules folder and move all my modules in this new folder? Will Drupal handle this properly?


Grouping modules is allowed in Drupal, when the modules are not already modules. Because, the modules are registered in System table by the location of the module. So, Changing the folder structure will result in fatal errors.

If you would like to change the folder structure then you need to disable the modules and uninstall them. After that, you can re-enable them after changing the folder structure by grouping them.

Note: Make sure you won't lose any data when you un-install the custom modules. Take a backup of database and source code before doing any changes for safe side.

  • Not really. You can move around modules while enabled provided other modules are not dependent on module being moved to avoid call to undefined function fatal errors. And its not required to uninstall modules disable/enable will do
    – GoodSp33d
    Sep 21 '12 at 14:13

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.