Search code examples
drupalmodulereinstall

Drupal Module Development : Uninstall/Reinstall/Repeat?


I'm developing a custom module for Drupal on my local machine.

When I edit my code, the changes are never applied right away. So, I go to Administer Modules, and uninstall, and then reinstall my module. This is cycle of uninstall-install-develop-repeat is slow and tedious.

Is there a better way to do it?

My module makes extensive use of Drupal framework so I'm not sure developing it exclusively in PHP first is an option.


Solution

  • I would highly recommend installing the Devel module. It is very useful while developing for Drupal. Once installed, you can enable the Devel block which is extremely useful. It has a list of links to perform somewhat tedious tasks faster, such as emptying the cache, reinstalling modules, rebuilding the menus, etc.

    Many of the changes to your module should not require visiting the modules page. You mostly see the need to do this when you are changing the menu with hook_menu() in your module, as the menus are only rebuilt when visiting that page (or using Devel block "Rebuild Menus" link ;) )