I'm working on a Drupal 7 site build and I have a local development environment. The site has CiviCRM working with it, but I'm not doing any work related to CiviCRM so I'd like to just have it disabled in my local environment.

Can I somehow set my civicrm.settings.php or other file to just have CiviCRM disabled (or pointing to a dummy civi install) when working locally?

I could disable the module, obviously, but this throws a bunch of errors on various places, so I guess ideally I want to 'fake out' CiviCRM with fake database or other information in settings.php, making everything just fail silently.

2 Answers 2


I use a "fake" database and a local civicrm.settings.php. you can encrypt the data if necessary. That way any references are maintained. Another approach is to use a multisite configuration and share some of the tables. If you disable the civicrm module, and you are getting errors, then it will depend on the nature of the errors (ie. view references to civicrm entities?) If you go that route, refer to this or this

  • Thanks, simple response that confirmed what I found which is it's best to just have a fake civi db setup to avoid errors.
    – Feature
    Dec 9, 2014 at 20:05

In a clean Drupal and CiviCRM install, the CiviCRM module can be disabled without generating any errors.

Getting CiviCRM working in a local development environment that doesn't mirror the configuration of the actual site can be a pain and CiviCRM adds a lot of overhead to page loads and increases the memory required for many tasks, but the steps for resetting the paths and deleting temp files are well documented at http://wiki.civicrm.org/confluence/display/CRMDOC/Moving+an+Existing+Installation+to+a+New+Server+or+Location

CiviCRM includes handful of Drupal modules that give Drupal access to the CiviCRM data in modules like Views and Rules as well modules that do things like add or remove users from roles based on having paid their membership, but CiviCRM is much more than just those modules. CiviCRM is a large PHP project (much larger than Drupal core) that runs within Drupal, WordPress, or Joomla's menu and authentication and includes APIs and hooks that allow custom development to tap into CiviCRM at many levels with any of those CMSes.

You could probably get away with a "dummy" CiviCRM install if the site hasn't done much customization to CiviCRM or written any custom code that leverages it, but if disabling CiviCRM "throws a bunch of errors on various places" my guess is you are working with an instance of CiviCRM that has already been customized and integrated. You'd have to share the specific errors for anyone to confirm that. As soon as anyone added a custom field to one of the CiviCRM data types (profiles, contributions, events, etc), that fields could be used in a View. If a custom field is already used in a View, you have to get the client's copy of CiviCRM running or risk deleting a CiviCRM reference when updating a View.

While CiviCRM isn't Drupal, it isn't rocket science either. If you aren't sure what customizations and integration have been done, it is much safer to get CiviCRM working than trying to disable it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.