Cleanup of Drupal modules folders
Keeping your drupal modules folder very clear is important part of development. This is the common structure :
- Contrib - modules from Drupal.org
- Custom - modules developed for the specific project
- Features - exported features for Features-driven development
This structure will give better understanding about the modules to other developers and prevent them from hacking the Drupal's contributed modules.
In my case, all the contrib, custom, features were placed in single folder (sites/all/modules/). So the modules folder had nearly hundred modules, its too irritating for any developer. So I planned to move all the modules to their corresponding folders according to the common drupal folder structure. There were many issues after moving all the modules into specific folders.
Drupal's Registry rebuild module gave the opportunity to clear the registry through cli (drush/php)
- Backup your database,
- Download and place the registry_rebuild module into your drupal modules folder,
- Move all the modules into their corresponding folders,
- Run drush rr command to clear all the registry in the database.
After clearing the registry the site is working like a charm, and its a big relief for any developer.