8

That's a good question that should have a canonical answer but doesn't. Here's a recent similar question and answer: method for versioning configuration of civicrm? I suspect there are other good references out there, please add them here. Part of the challenge, which is not unique to CiviCRM, is that the definition of "configuration" can be grey in some ...


7

Generally, CiviCRM's data is stored in separate tables and you can treat the CRM and CMS as separate entities. Many people store the CRM and CMS in separate databases for convenience (eg exampleorg_drupal & exampleorg_civicrm). Particular items to check, though: If you are using Webform CiviCRM or CiviCRM Entity, you may need to rebuild connections ...


3

Usually I copy the site that is the best way to ensure all things are correct. But I can imagine that is sometimes cumbersome. I have therefor used an extension org.civicoop.configitems (https://github.com/CiviCooP/org.civicoop.configitems) An example configuration is stored in https://github.com/CiviCooP/nl.roparun.generic that configuration could be ...


2

CiviCRM Features looked like it had promise: https://www.drupal.org/project/features_civicrm I spoke to the former maintainer, Tim Mallezie, about this a while ago. He was very helpful. The module was proving hard to maintain, as each entity in CiviCRM required it's own handler (perhaps this is something CiviCRM Entity could help with); and the overhead was ...


2

I have not tried this but https://lab.civicrm.org/extensions/configitems says The extension can import the following types of items: ContactTypes MembershipTypes RelationshipTypes OptionGroups with OptionValues Groups Tags FinancialAccounts FinancialTypes EventTypes ActivityTypes LocationTypes CaseTypes CustomGroups with CustomFields CiviCRM Settings (...


2

Drush can support VCS deployments and you can tell drush make to keep the .git directory with "drush make --working-copy your-platform.make". However, unless it's changed recently, drush doesn't have post-install hooks, so it won't handle composer/bower/npm well. Composer has support for "post-install-cmd", but civicrm itself is not on packagist. I'm not ...


2

It sounds like you have quite a mission. There is no smooth path for synching between the two. We have tried building such a process but it was not robust enough to release. Our general approach is that if anything is created on live then replicate it on dev, and do not create anything on dev without having first created it on live. This is the only way ...


2

So a few things, if you turn on logging then you'll get a full timestamped history of changes to all tables in the database. If you had this on both environments then you would now be able to see all the changes. However what your describing is a workflow issue, i.e. having changes happening in two environments without being clear on how changes will be ...


2

To address some of the specific concerns: First - check out hook_civicrm_managed and the *.mgd.php file format in the dev docs. A lot of changes made in the db can be made in code instead and easily moved between sites. Added/edited reports can be moved to an extension. A corresponding .mgd.php file will ensure the report is added to the db. See Extended ...


2

As with the others, I don't know of any great way to sort out the current situation easily, or an out of the box way to make it work super smoothly in the future although of course it does become somewhat smoother if you plan around this from the start when doing your changes. As far as doing this again in the future or "what to do differently next time", ...


1

I have not tried this but https://lab.civicrm.org/extensions/configitems says The extension can import the following types of items: ContactTypes MembershipTypes RelationshipTypes OptionGroups with OptionValues Groups Tags FinancialAccounts FinancialTypes EventTypes ActivityTypes LocationTypes CaseTypes CustomGroups with CustomFields CiviCRM Settings (...


1

As Pete & Parvez have already said, there is no general solution for syncing two systems as you describe. It depends quite what changes you have been making but some of your difficulties can be eased by packaging your enhancements as extensions. There are plenty of examples of extensions creating and using custom fields, tables, reports etc in a ...


1

@bass Can you just make a copy of the civicrm database to initialize your new instance? Unless your issue is to 'merge' this configuration into another existing instance, in which case all comment so far do apply. @japp Congrats on a well rounded extension. What are the pros/cons of this extension vs the managed entities mechanism (https://docs.civicrm.org/...


1

Assuming you did your customizations in an extension you would install the extension on production. If you then want continue updating your customizations in your extension you can do so on test, and then issue a new release of your extension. The Upgrader (check https://docs.civicrm.org/dev/en/latest/extensions/civix/#generate-upgrader) can help you to ...


1

When I posted this question in 2015, we were looking at implementing something. The result, which is not a complete solution as of March 2017, was this extension. Ultimately, we ended up doing something else on that project, which was exporting specific CiviCRM tables and copying them across from dev ➡ stage ➡ prod. I've documented what did and didn't work ...


1

In larger projects we tend to put configuration stuff (like setting up contact_sub_types, activity_type, case_types, groups, tags etc.) in a specific config extension that can then be deployed in each environment. When doing so we tend to put the configuration into json files. But there is nothing like features as far as I know.


Only top voted, non community-wiki answers of a minimum length are eligible