Recently on a server I was on I was getting a drush error that would not let me use drush dl, drush cc, etc… What was most frustrating is that the error was being reported about a site that doesn’t even exist on the server! What to do?
require_once(/home/WWU/bronsem/cmssites/test/sites/wcedev.atus.wwu.edu/modules/entity/includes/entity.inc):[warning] failed to open stream: No such file or directory bootstrap.inc:3066 PHP Fatal error: require_once(): Failed opening required '/home/WWU/bronsem/cmssites/test/sites/wcedev.atus.wwu.edu/modules/entity/includes/entity.inc' (include_path='.:/usr/share/php5:/usr/share/php5/PEAR') in /srv/www/campusweb/cmssites/test/includes/bootstrap.inc on line 3066 Drush command terminated abnormally due to an unrecoverable error. [error] Error: require_once(): Failed opening required '/home/WWU/bronsem/cmssites/test/sites/wcedev.atus.wwu.edu/modules/entity/includes/entity.inc' (include_path='.:/usr/share/php5:/usr/share/php5/PEAR') in /srv/www/campusweb/cmssites/test/includes/bootstrap.inc, line 3066
That is a pretty gross error. When that error occurs it can be nigh impossible to get your site running. Awhile ago a colleague, Vid @ Developments, mentioned the drush rr command which is not built into drush. Go to http://drupal.org/project/registry_rebuild and get it. It is super simple, cleans up random cruft like above. Often those types of messages occur when you are removing a module from your sites/sitename/module folder when you want to use the version in sites/all/modules. If you run into errors, give drush rr a whirl.
Steps to install
- Navigate to a location where you can run drush commands. For most of us our home directory is fine.
- Type “drush dl registry_rebuild” without the quotes and hit enter. Now it is installed. You should see something like: Project registry_rebuild (7.x-1.9) downloaded to /home/WWU/bronsem/.drush/registry_rebuild. [success]
Project registry_rebuild contains 0 modules: .
- Now navigate to the site that is causing you issues and run drush rr.
Supposedly you can run the command from a URL as well. That might be useful if you are on a box that doesn’t allow you access to the command line. For full documentation check out the project page.