Drupal 8: Uninstall or Disable module manually

Follow below steps in uninstall Broken module from Database



  • Find record 'core.extension' in `config` table.
  • Remove module name entry from serialize string which is stored in blob field like below example

  •  $data = unserialize('a:2:{s:6:"module";a:52:{s:14:"automated_cron";i:0;s:10:"basic_auth";i:0;s:5:"block";i:0;s:13:"block_content";i:0;s:10:"breakpoint";i:0;s:8:"ckeditor";i:0;s:5:"color";i:0;s:7:"comment";i:0;s:6:"config";i:0;s:7:"contact";i:0;s:10:"contextual";i:0;s:8:"datetime";i:0;s:5:"dblog";i:0;s:13:"my_module";i:0;s:13:"doctrine_base";i:0;s:18:"dynamic_page_cache";i:0;s:6:"editor";i:0;s:5:"field";i:0;s:16:"field_collection";i:0;s:8:"field_ui";i:0;s:4:"file";i:0;s:6:"filter";i:0;s:3:"hal";i:0;s:4:"help";i:0;s:7:"history";i:0;s:5:"image";i:0;s:4:"link";i:0;s:7:"menu_ui";i:0;s:4:"node";i:0;s:5:"oauth";i:0;s:7:"options";i:0;s:10:"page_cache";i:0;s:4:"path";i:0;s:4:"push";i:0;s:9:"quickedit";i:0;s:3:"rdf";i:0;s:4:"rest";i:0;s:6:"restui";i:0;s:6:"search";i:0;s:13:"serialization";i:0;s:8:"shortcut";i:0;s:6:"system";i:0;s:8:"taxonomy";i:0;s:4:"text";i:0;s:7:"toolbar";i:0;s:4:"tour";i:0;s:6:"update";i:0;s:4:"user";i:0;s:8:"views_ui";i:0;s:17:"menu_link_content";i:1;s:5:"views";i:10;s:8:"standard";i:1000;}s:5:"theme";a:4:{s:6:"stable";i:0;s:6:"classy";i:0;s:6:"bartik";i:0;s:5:"seven";i:0;}}');  
     unset($data['module']['my_module']);  
     echo (serialize($data));  
    

  • Save the table data again.
  • Follow the same step into `cache_config` table.
  • Remove php folder from sites/default/files/
  • You are done!!!

Comments

Post a Comment

Popular Posts