I have all of my modules just in my drupal installation. But I've just read that they should be in my drupal/sites/all folder. Can I move them there and will my site find them without any breaks or problems? thanks!

Comments

modul’s picture

Your Drupal installation comes with a bunch of modules (aggregator, block, blog, blogapi...). They should be (and remain) in your /modules folder. They are the core modules.
But if you install extra modules, they should go in your /sites/all/modules folder. They are the contributed modules. I think what you read refers to these contributed modules.

It's possible to move the modules anywhere you want, I suppose, but it would probably cause a lot of hassle. So, it's better to stick to /modules for the core stuff, and to /sites/all/modules for the contributed modules.

guitarma’s picture

That gives me clarity, thanks. So, is it ok for me to move my contributed modules without any problems? Or leave them and just put any new ones in the sites/all/modules folder, from here on out.

modul’s picture

Drupal has its own ways of finding your modules: first it looks in place A, if nothing is found then in place B, then C and so on. So, most likely (but don't take my word for it :-) you could move your contributed modules from /modules to /sites/all/modules, and Drupal would (probably) still find them, unless the first path (/modules) would be stored in some database table. In that case, Drupal wouldn't find back that particular module if you shift it to /sites/all/modules. I'm not sure if that would be the case.

To be on the safer side, why don't you first try with 1 contributed module, and see how Drupal responds?

And for new contributed modules, better put them in /sites/all/modules right away.

The main disadvantage of putting contributed modules in /modules (where only core modules are supposed to be), could be in a future upgrading process. The upgrade might go to /sites/all/modules, but the version actually working might still be the one in /modules, which might cause trouble.

So, first try to "cleanse" your /modules folder by moving 1 contributed module, I'd say.

guitarma’s picture

Thanks, modul, I appreciate it!

mossaab’s picture

Hi,

You should do it in this order:
1. Desactivate contributed modules.
2. Move modules to sites/all/modules
3. Reactivate them.

Good luck