Fix Drupal Registry with Registry Rebuild

Kristian Polso • July 8, 2014

Drush Drupal Planet

It has happened to all of us. You mistakenly remove a module directory or migrate your site and forget to include some necessary modules. This causes your Drupal site only to show the WSOD and perhaps the following error:

 Fatal error: Class 'RulesEventHandlerEntityBundle' not found in /sites/all/modules/rules/modules/node.rules.inc on line 147

This error is caused because Drupal keeps an internal registry of all of the files of the system, modules, themes etc. If it can't find some of these files, you will receive fatal errors and the registry is borked.

Luckily, fixing the registry is quite easy with Registry Rebuild.

Registry Rebuild is a downloadable Drush command that is packaged as a module for an easy download.

Using it is incredibly easy. Just install the command with

 drush dl registry_rebuild

After that, run the command with 

 drush registry-rebuild 

or just

 drush rr

The project page also has the instructions on how to use it without Drush.

Share This Post