Hi, when I first began with Drupal, I installed contributed modules do my core modules directory. I want to fix this by putting them in the correct location (sites/all/modules). If I move my modules to another directory will it mess up my site? Many of the modules are active.

Thanks!

Comments

Anonymous’s picture

Some modules might mess it up, others can be easily moved.
Just make a backup and try one by one.

lionheart8’s picture

First and foremost, back up your current site, ie. the Drupal folder + database in case something goes wrong.

I had the same situation a few weeks ago, though my modules where not directly in the module folder but in modules/contrib. That was the case with the themes as well (themes/contrib).

You of course have to put the site in offline mode, like during any major update.
I started with the themes by creating sites/default/themes <= I think it does not matter whether one uses "all" or "default" as at least some module install. instructions recommend this, I think like the image module, if I remember well.

I disabled all non core modules/themes & changed to the Garland theme, like is recommended when doing a major update.

I then moved the contributed theme folder of the theme I'm using to sites/default/themes.

When I enabled everything again & changed to my contributed theme, everything with the theme functioned perfectly.

I then moved to my several dozen modules. Everything seemed to work well, but some unexpected problem cropped up after I updated at the same time from 6.12 to 6.13. It kept showing I had 6.12 whatever I did & I even sought help here in the forums but got response.
I thought there was something wrong with the new D6.13.

Anyway, the problem was that I had without realizing uploaded an old complete folder of D6.12 into the core modules folder (ie. modules/drupal 6.12)!!! & apparently, however many times I uploaded 6.13 files, & overwrote 6.12 files, run update.php this particular wrongly placed folder was what was being recognized as the real Drupal & since it was outdated, that explained why the update was "failing" seemingly inexplicably.
So that scare that caused so much headache for 2, 3 days was from a completely unrelated problem.

As soon as I deleted it the update run as expected. ;)
Apparently, ALL the other modules transferred to sites/default/modules functioned with no problem.
I think other users who have done so will give you a nod, BUT if you do not want to take chances, & happen to have a copy of your site online or on your PC, you can give it a try first.

I have had some problems, though after I disable modules & enable them again during updates of the image gallery not showing pictures, just accompanying text, including this time, but this has been solved by going back, disabling all modules again & then enabling then again.
It seems there is some sequence one has to follow regarding disabling or re-enabling the image module, which I yet have to understand, but that has happened at other times & is certaily not related to the transfer of the modules to sites/ ... :) which I did for the first time, in contrast to dozens of Drupal updates.

Also remember, that if you use taxonomy for any of the content types made by any of those modules, you may have to re-associate the term with the content content type.

Regards

lionheart8’s picture

I think it makes sense to transfer a few modules (or one if you dont have many) at a time.
In my case I did over 70 modules in one go with no problem, though that might not work for everyone.