a simple way to re-install drupal modules 

 March 6, 2010

By  NickLitten

This website has been running on the Drupal CMS since upgrading from Joomla to Drupal 5 back in 2007.

I’ve closely followed each new Drupal release and experienced the teething pains as modules have evolved to the exciting state they are in the moment. Drupal Rocks and I’m eagerly awaiting the new Drupal 7 release (as soon as some of my core modules are compatible – your hear that ubercart? 😉 )

During this time I’ve managed to thoroughly cock-up a number of drupal modules, and while playing the php-cleanup-game on nicklitten.com this morning I discovered something rather nifty.

To re-install corrupted Drupal Modules using the Devel Module.

Drupal stores some information about themes/modules/theme engines in a table named system. It’s easy to edit manually and shows every single modules that you have installed on the site back to the year dot. Basically, all you have to do in order to make Drupal forget your module is this:

DELETE FROM system WHERE name = 'module_name' AND type = 'module'

Of course, to delete all the related modules and bits + pieces using the like opcode:

delete from system where filename like '%ecommerce%' and type ='module'

So thats the manual method. It’s really nice to cleanup the file. You can do it manually for modules that you want to re-install or just use the DEVEL module.


 JULY 2017 UPDATE – it’s a new era. A WordPress Era. I still love Drupal, but was increasingly annoyed by problems with Druapl8 and decided to play with something new.


IBM i Software Developer, Digital Dad, AS400 Anarchist, RPG Modernizer, Shameless Trekkie, Belligerent Nerd, Englishman Abroad and Passionate Eater of Cheese and Biscuits. Nick Litten Dot Com is a mixture of blog posts that can be sometimes serious, frequently playful and probably down-right pointless all in the space of a day. Enjoy your stay, feel free to comment and remember: If at first you don't succeed then skydiving probably isn't a hobby you should look into.

Nick Litten

related posts:

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}
__CONFIG_colors_palette__{"active_palette":0,"config":{"colors":{"cff50":{"name":"Main Accent","parent":-1},"a344d":{"name":"Accent Transparent","parent":"cff50"}},"gradients":[]},"palettes":[{"name":"Default","value":{"colors":{"cff50":{"val":"var(--tcb-skin-color-0)"},"a344d":{"val":"rgba(46, 138, 229, 0.85)","hsl_parent_dependency":{"h":210,"l":0.54,"s":0.78}}},"gradients":[]},"original":{"colors":{"cff50":{"val":"rgb(0, 178, 255)","hsl":{"h":198,"s":1,"l":0.5}},"a344d":{"val":"rgba(0, 178, 255, 0.85)","hsl_parent_dependency":{"h":198,"s":1,"l":0.5}}},"gradients":[]}}]}__CONFIG_colors_palette__

Get In Touch

I’m always looking for awesome input, feedback and critique!