Drupal Answers is a question and answer site for Drupal developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am creating on Drupal 8 module. I have used a custom table to store the data collected from forms. Somehow during installation, tables are not created due to an issue in the install file. Now I have fixed the issue, and I want to install the module again.

How can I re-install a module?

From this and this discussions, I know the Disable module functionality has been removed.

Is there any other way to re-install a module so that its database tables are created?

share|improve this question
up vote 9 down vote accepted

The Devel module can also help here.

It makes a "Reinstall modules" page available at /devel/reinstall, which lets you re-install modules in bulk.

It's also worth mentioning Drush; dis (obviously) doesn't work any more, but pm-uninstall and en still do. And if you have Devel installed, you can invoke a reinstall with

drush dre module1 module2
share|improve this answer
Note that devel doesn't yet support Drupal 8's uninstall-only changes cgit.drupalcode.org/devel/tree/drush/devel.drush.inc#n115 – anavarre Jun 25 '14 at 10:12
I've started an issue to fix that drupal.org/node/2292425 – anavarre Jun 25 '14 at 12:23

As you said "Disable functionality is removed from Drupal 8" ..

The short answer is - you probably are looking for the "Uninstall" tab found on the "Extend" (Modules) page /admin/modules/uninstall

There is no longer any grey area between a module being on and active vs off and "purged". "Disabled" is no longer a thing. Uninstalling a module means removing all traces of it.

Go to admin/modules/uninstall and uninstall module... Then enabled the module from modules list page. That should install the module again.

For Example ....

Before Installing Ban Module in Drupal 8 ... ban_ip module doesn't exist in database..

enter image description here enter image description here

After Installing Ban Module in Drupal 8... ban_ip table is created and module cannot be disabled but can be uninstalled in admin/modules/uninstall

enter image description here enter image description here enter image description here

Now if you uninstall module.. Table will be removed from database and module can be installed again which will create tables in the database..

enter image description here enter image description here

share|improve this answer
Thanks a lot for such awesome explanation. I checked the list of modules in uninstall tab, but couldn't found my module. If you want to check code here github.com/mohit-rocks/messaging . Currently you can install module and settings related forms are coming. – mohit_rocks May 10 '14 at 9:34

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.