Friday, January 22, 2021

Disabling a Module via the Database in Drupal 8

 

1) In D7 you could do this in the systems table by setting the status to 0. In D8, however this is stored in the config table. You can edit the blob value in the data field for this result:

SELECT * FROM config WHERE name like '%.extension%';


2) Or here's the fast (but dirty) solution:

- Delete the module's folder from the file system (/modules/

- truncate table cache_config using below commands 

 ---------------------------------------------------------------------


TRUNCATE cache_config;

TRUNCATE cache_container;

TRUNCATE cache_data;

TRUNCATE cache_default;

TRUNCATE cache_discovery;

TRUNCATE cache_dynamic_page_cache;

TRUNCATE cache_entity;

TRUNCATE cache_menu;

TRUNCATE cache_render;

TRUNCATE cache_toolbar;