Answers.Body: <p><strong>UPDATE</strong>: Note this is now slightly out of date but the gist is correct, so follow the spirit if not the exact details. In particular if I was doing it again now there is a non-roundearth way to also install D8+civi, e.g. <a href="https://civicrm.stackexchange.com/a/35608/181">https://civicrm.stackexchange.com/a/35608/181</a> (official docs are in the works), and that method will set different path settings in civicrm.settings.php for you than described below, e.g.</p>
  
  <pre><code>$civicrm_paths['civicrm.files']['url'] = 'http://example.com/sites/default/files/civicrm';
  $civicrm_paths['civicrm.files']['path'] = '/full/filesystem/path/to/sites/default/files/civicrm';
  </code></pre>
  
  <hr>
  
  <ol>
  <li><p>Start creating a new D8+civi site by using the installer at <a href="https://gitlab.com/roundearth/drupal-civicrm-project" rel="nofollow noreferrer">https://gitlab.com/roundearth/drupal-civicrm-project</a>.</p></li>
  <li><p>When doing the D8 install part, just install a minimal site and don't further configure it - just what's needed to get D8 installed.</p></li>
  <li><p>Follow the standard drupal instructions to upgrade. <a href="https://www.drupal.org/docs/8/upgrade/upgrading-from-drupal-6-or-7-to-drupal-8" rel="nofollow noreferrer">https://www.drupal.org/docs/8/upgrade/upgrading-from-drupal-6-or-7-to-drupal-8</a>. The short version is enable the Migrate UI module on the new site and then go to /upgrade.</p></li>
  <li><p>Do not enable civicrm yet.</p></li>
  <li><p>From your old site, export the civicrm_xxx tables.</p></li>
  <li><p>There is probably a better way to do this step but it worked for me to manually update any urls and paths in the export file (taking care with php-serialized strings) and then import the sql file into the new database. Note that any references to sites/all/modules/civicrm are now under vendor/civicrm/civicrm-core. URLs for sites/default/files/... can stay as is, but note that filepaths will now be web/sites/default/files. Also userFrameworkResourceURL is now libraries/civicrm.</p></li>
  <li><p>Copy civicrm.settings.php to the new site under web/sites/default. Edit the file:
  <code>Change CIVICRM_UF from "Drupal" to "Drupal8".
  Change the mysql connection strings.
  Change paths and urls as above. Again note civicrm_root is now under vendor/civicrm/civicrm-core, and you need to put "web/" in front of filepaths to "sites/XXX".</code></p></li>
  <li><p>Enable the civicrm module.</p></li>
  <li><p>Clear caches at admin/config/development/performance and also the civicrm caches at civicrm/admin/setting/updateConfigBackend?reset=1. I also ran /civicrm/menu/rebuild?reset=1 but I'm not sure it's necessary here.</p></li>
  <li><p>The UI will look all messed up because it was a minimal drupal install but you can change the theme and set things as you normally would.</p></li>
  <li><p>You may also need to set these settings in civicrm.settings.php:
  <code>$civicrm_setting['URL Preferences']['userFrameworkResourceURL'] = CIVICRM_UF_BASEURL . '/libraries/civicrm/';
  $civicrm_paths['civicrm.root']['url'] = CIVICRM_UF_BASEURL . '/libraries/civicrm/';
  $civicrm_setting['domain']['userFrameworkResourceURL'] = CIVICRM_UF_BASEURL . '/libraries/civicrm/';
  $civicrm_paths['cms.root']['path'] = '/full/path/to/web'; // the "web" folder at the root of the install</code></p></li>
  </ol>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-02-26T19:03:16.177Z
Answers.Text: It sounds like in step 6 you've got URLs going to `vendor/civicrm/civicrm-core`, but that typically isn't web-accessible.  Maybe they should go to `libraries/civicrm` instead?
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-02-26T19:09:31.463Z
Answers.Text: Yes the urls should go to libraries/civicrm, but anything that previously pointed to the file path in the filesystem for sites/all/modules/civicrm now need to be vendor/civicrm/civicrm-core. I admit this isn't a detailed list of what settings to change. I'm thinking there must be a better way anyway since this would hopefully never be the official way to do it. Just this worked for me.
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-02-27T16:27:47.317Z
Answers.Text: maybe creating this as a new entry in civicrm dev docs?:
  https://github.com/civicrm/civicrm-dev-docs
Answers.UserDisplayName: luciano_s
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-02-26T15:09:50.557Z
Answers.LastActivityDate: 2020-06-10T19:32:33.623Z
Answers.LastEditDate: 2020-06-10T19:32:33.623Z
Answers.UserDisplayName: Demerit
Body: <p>There is maybe a simpler path but this worked for me. Documenting this here since I don't know where else to put it.</p>
  
Tags: <upgrade><drupal-8>
Title: Can I upgrade a drupal 7 + civi site to drupal 8?
ThreadText: # Can I upgrade a drupal 7 + civi site to drupal 8?
  
  (Asked by: username_0 on 2019-02-26)
  
  There is maybe a simpler path but this worked for me. Documenting this here since I don't know where else to put it.
  
  **Tags:** upgrade, drupal-8
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2019-02-26. Score: 4
  
  **UPDATE**: Note this is now slightly out of date but the gist is correct, so follow the spirit if not the exact details. In particular if I was doing it again now there is a non-roundearth way to also install D8+civi, e.g. <https://civicrm.stackexchange.com/a/35608/181> (official docs are in the works), and that method will set different path settings in civicrm.settings.php for you than described below, e.g.
  
  ```
  $civicrm_paths['civicrm.files']['url'] = 'http://example.com/sites/default/files/civicrm';
  $civicrm_paths['civicrm.files']['path'] = '/full/filesystem/path/to/sites/default/files/civicrm';
  
  ```
  
  ---
  
  1. Start creating a new D8+civi site by using the installer at <https://gitlab.com/roundearth/drupal-civicrm-project>.
  2. When doing the D8 install part, just install a minimal site and don't further configure it - just what's needed to get D8 installed.
  3. Follow the standard drupal instructions to upgrade. <https://www.drupal.org/docs/8/upgrade/upgrading-from-drupal-6-or-7-to-drupal-8>. The short version is enable the Migrate UI module on the new site and then go to /upgrade.
  4. Do not enable civicrm yet.
  5. From your old site, export the civicrm\_xxx tables.
  6. There is probably a better way to do this step but it worked for me to manually update any urls and paths in the export file (taking care with php-serialized strings) and then import the sql file into the new database. Note that any references to sites/all/modules/civicrm are now under vendor/civicrm/civicrm-core. URLs for sites/default/files/... can stay as is, but note that filepaths will now be web/sites/default/files. Also userFrameworkResourceURL is now libraries/civicrm.
  7. Copy civicrm.settings.php to the new site under web/sites/default. Edit the file:
     `Change CIVICRM_UF from "Drupal" to "Drupal8".
     Change the mysql connection strings.
     Change paths and urls as above. Again note civicrm_root is now under vendor/civicrm/civicrm-core, and you need to put "web/" in front of filepaths to "sites/XXX".`
  8. Enable the civicrm module.
  9. Clear caches at admin/config/development/performance and also the civicrm caches at civicrm/admin/setting/updateConfigBackend?reset=1. I also ran /civicrm/menu/rebuild?reset=1 but I'm not sure it's necessary here.
  10. The UI will look all messed up because it was a minimal drupal install but you can change the theme and set things as you normally would.
  11. You may also need to set these settings in civicrm.settings.php:
      `$civicrm_setting['URL Preferences']['userFrameworkResourceURL'] = CIVICRM_UF_BASEURL . '/libraries/civicrm/';
      $civicrm_paths['civicrm.root']['url'] = CIVICRM_UF_BASEURL . '/libraries/civicrm/';
      $civicrm_setting['domain']['userFrameworkResourceURL'] = CIVICRM_UF_BASEURL . '/libraries/civicrm/';
      $civicrm_paths['cms.root']['path'] = '/full/path/to/web'; // the "web" folder at the root of the install`
  
  > **Comments:**
  > **username_1**: It sounds like in step 6 you've got URLs going to `vendor/civicrm/civicrm-core`, but that typically isn't web-accessible.  Maybe they should go to `libraries/civicrm` instead?  
  > **username_0**: Yes the urls should go to libraries/civicrm, but anything that previously pointed to the file path in the filesystem for sites/all/modules/civicrm now need to be vendor/civicrm/civicrm-core. I admit this isn't a detailed list of what settings to change. I'm thinking there must be a better way anyway since this would hopefully never be the official way to do it. Just this worked for me.  
  > **username_2**: maybe creating this as a new entry in civicrm dev docs?: https://github.com/civicrm/civicrm-dev-docs  
  
  ---
  
  