{"id":50,"date":"2020-01-14T05:24:00","date_gmt":"2020-01-14T05:24:00","guid":{"rendered":"https:\/\/molecularsciences.org\/content\/?p=50"},"modified":"2020-11-29T19:30:26","modified_gmt":"2020-11-29T19:30:26","slug":"porting-drupal-configuration-with-configuration-management-module","status":"publish","type":"post","link":"https:\/\/molecularsciences.org\/content\/porting-drupal-configuration-with-configuration-management-module\/","title":{"rendered":"Porting drupal configuration with configuration management module"},"content":{"rendered":"\n<p>This article explains how to port drupal configurations from one site to another. First we will create a custom content type and then port it over to another drupal site.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. Create first instance of drupal<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>$ drush dl drupal --drupal-project-rename=frominstallation\n$ cd frominstallation\n$ drush site-install standard --db-url='myql:\/\/root:vagrant@localhost:8080\/frominstallation --site-name=FROM --account-name=admin --account-pass=1234\n$ drush dl configuration\n$ drush en configuration_ui -y\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">2. Create second instance of drupal<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>$ cd..\n$ drush dl drupal --drupal-project-rename=toinstallation\n$ cd toinstallation\n$ drush site-install standard --db-url='myql:\/\/root:vagrant@localhost:8080\/toinstallation --site-name=TO --account-name=admin --account-pass=1234\n$ drush dl configuration\n$ drush en configuration_ui -y\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">3. Create a new content type<\/h3>\n\n\n\n<p>a. log into frominstallation drupal instance b. click on structure &gt; Add content type c. type testcc for name and &#8220;Create Content Type&#8221;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">4. Start tracking the content type configuration<\/h3>\n\n\n\n<p>a. click on Configuration &gt; configuration Management b. Under &#8220;Not Tracking&#8221; tab, check &#8220;testcc&#8221; and click on &#8220;Start Tracking&#8221; c. This would create many inc files in \/sites\/default\/files\/config folder<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">5. Port configuration over the second drupal installation<\/h3>\n\n\n\n<p>a. copy the contents of config file of frominstallation instance to toinstallation b. cd to toinstalltion directory c. drush config-sync d. log into toinstallation drupal instance to verify the new content type was ported correctly.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This article explains how to port drupal configurations from one site to another. First we will create a custom content type and then port it over to another drupal site. 1. Create first instance of drupal 2. Create second instance of drupal 3. Create a new content type a. log into frominstallation drupal instance b. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22],"tags":[21],"class_list":["post-50","post","type-post","status-publish","format-standard","hentry","category-drupal","tag-drupal"],"_links":{"self":[{"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/posts\/50","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/comments?post=50"}],"version-history":[{"count":1,"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/posts\/50\/revisions"}],"predecessor-version":[{"id":51,"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/posts\/50\/revisions\/51"}],"wp:attachment":[{"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/media?parent=50"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/categories?post=50"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/tags?post=50"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}