2

I am trying to disable modules in Drupal 8, and I found some solution like Drupal console, but I am not sure how to use it with XAMPP.

I am unable to understand how I can disable a Drupal 8 module. With Drupal 7, that was possible directly from the user interface, but in Drupal 8 the checkboxes shown before the module name are disabled.

enter image description here

How do I disable a module in Drupal 8?

  • Welcome to Drupal Answers! You didn't say what exactly you don't understand, so the question is a little too broad for us. We cannot tell you everything the documentation says, starting from how to install Drupal Console. Actually, the code doesn't even ask a question, but it makes a request (for any help). – kiamlaluno Sep 8 '18 at 10:45
3

In Drupal 8, you cannot anymore disable modules: You can just install or uninstall them. Uninstalling a module has the same effect it had on Drupal 7 and previous versions: It removes the database tables the module installed.

On /admin/modules, Drupal shows you which modules are not installed, and which modules are installed. You can click the checkbox shown for the modules that aren't installed; clicking on Install at the bottom of the page will install them.

screenshot

For installed modules, clicking on the checkbox shown before the module name doesn't have any effect. In fact, the checkbox is disabled.

To uninstall a module from the user interface, you just go to /admin/modules/uninstall (or click on the Uninstall tab visible on /admin/modules).

screenshot

screenshot

Select the modules you want to uninstall, and click on the Uninstall button shown on the bottom of the page.

Keep in mind that Drupal can still not being able to uninstall a module for various reasons, for example because the module implements an entity and you created those entities on the site.

You could also use Drupal Console for uninstalling a module, but you would need to install it (on the server). After you install it, and open a terminal window on the Drupal root directory of the site, with drupal module:uninstall <module_name> you would uninstall the <module_name> module.

From the user interface it's easier. It's the only possible way, if you are working on a remote site for which the provider doesn't allow you to use an SSH shell.

0

You need to type the command and you need change sites/defulft/settings.php $databases conect host localhost to 127.0.0.1

Disable module

./vendor/bin/drupal mou module_name

Enable module

./vendor/bin/drupal moi module_name

List all

./vendor/bin/drupal list
  • 2
    in Drupal 8, you don't disable modules: You just install or uninstall them, but that is different from disabling them, since disabling them would not remove the configuration nor the database tables used from the module. – kiamlaluno Sep 8 '18 at 10:48
  • Thanks for the reply, Without disable How I can Uninstall them ? and according to your comment where Can I run those commands to do same ? – Ranjan Sep 9 '18 at 5:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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