There are a few approaches, none perfect. It would be great to be able to export config of entities and load that into another site / instance.

1. It's possible to write code to generate the various entities using the CiviCRM API. This can work, but probably has higher up-front time costs than option 4 below. It's what I'd most likely do if I wanted to be able to test the deployment of changes and had a medium-scale budget.

2. CiviCRM offers a hook ([`hook_civicrm_managed()`](https://docs.civicrm.org/dev/en/master/hooks/hook_civicrm_managed/)) which you could use to configure your site with the various entities mentioned. This has some challenges, eg it "locks" the managed entities to the extension in question - disabling that extension in future might then remove the managed membership type, potentially affecting recorded memberships and so forth. (I'm not sure whether editing managed entities is permitted, either?)

3. It's possible to export the SQL entries which relate to the specific values you want, but you'd need to match up the IDs for the entities (memberships, contribution pages, price sets and options etc) on loading. Kinda ugly.

4. You can click your way through the config. I'd guess you're asking this because you think there should be a more reliable way to deploy configuration ... as of today, I don't think there is. This is your low budget option.

One important factor is that these entities may need to be created in a specific order to handle dependency, since the priceset / options may relate to the membership type, and that membership type may relate to an organisation contact, and ...


This is a question which has been asked before, but IMO hasn't as yet been solved well. These previous SE questions might offer some insight?

* https://civicrm.stackexchange.com/questions/6652/how-can-civicrm-manage-and-deploy-configuration
* https://civicrm.stackexchange.com/questions/4466/what-are-best-practices-for-deploying-changes
* https://civicrm.stackexchange.com/questions/7268/advice-on-moving-civicrm-configuration-only-when-launching-a-new-site