Rename Module is a Drupal module that provides a Drush command to rename custom Drupal modules. It handles the renaming of directories, files, and occurrences within files, ensuring a smooth transition from the old module name to the new one.
- Locate Module: Finds the specified module within the Drupal filesystem.
- Rename Directory: Renames the directory containing the module.
- Rename Files: Renames all files within the module directory that start with the old module name.
- Replace Occurrences: Safely replaces all occurrences of the old module name within the files.
- Download the module to your custom modules directory.
- Enable the module using Drush: `drush en [module_name]`.
- Clear the cache:
drush cr
.
Use the Drush command to rename a module:
drush rename-module:rename [old_name] [new_name]
- Drupal 9 or 10
- Drush
Contributions are welcome!