Skip to content

Using Lando to setup a drupal 8 site for conversion

carolyncole edited this page Feb 7, 2020 · 6 revisions

Set the directory

  1. Add lando file vi .lando.yml

    name: <site you are migrating>
    recipe: drupal8
    services:
      appserver:
        run:
          - composer install
          - drush --yes site-install minimal --site-name='Byzantine 8 upgrade' --site-mail='[email protected]' --account-name='admin' --account-mail='[email protected]' --account-pass='admin'
      legacy:
        type: mysql
    config:
      webroot: .
    tooling:
      setup:
        service: appserver
        description: sets up the machine for migration
        cmd:
          - composer require "drush/drush:^9.7.1"
          - composer require "drupal/migrate_plus"
          - composer require "drupal/migrate_tools"
          - composer require "drupal/migrate_upgrade"
          - drush --yes en migrate migrate_drupal migrate_drupal_ui migrate_upgrade
    
  2. Add composer file wget -O composer.json https://gist.githubusercontent.com/carolyncole/8c8db274ca9e19a1549467cb8ca1e554/raw/0ed504985b1bac6f29ed216b93f1e1097e854c9b/composer.json

  3. Add a settings.php

    mkdir sites
    mkdir sites/default
    wget -O sites/default/settings.php https://gist.githubusercontent.com/carolyncole/a01dff9c0bb337c8532e4fa181a4eab9/raw/ad839dce1667ed872b0cb74110d9ba65f0930bb8/settings.php
    
  4. start lando lando start

  5. Update file permissions

    chmod +w sites/default
    chmod +w sites/default/*
    
  6. Setup the site lando setup

  7. get login link lando drush uli and got to it in the web browser substites http://<site you are upgrading>.lndo.site for http://default

  8. get dump of legacy database

  9. import the legacy database to lando lando db-import --host legacy dump.sql

  10. run migration ui test by opening http://.lndo.site/upgrade

    • database host legacy
    • database user mysql
    • database password mysql
  11. add composer packages for byzantine

    lando composer require drupal/search_api drupal/cas drupal/captcha drupal/custom_formatters drupal/facets drupal/features drupal/feeds drupal/field_group drupal/google_analytics drupal/job_scheduler drupal/libraries drupal/omega_tools drupal/panels drupal/pathauto drupal/recaptcha drupal/xmlsitemap drupal/simple_sitemap
    
    lando drush --yes en search_api cas menu_link_content menu_ui system captcha color comment custom_formatters facets features feeds field_group image job_scheduler google_analytics libraries omega_tools options panels path pathauto pathauto recaptcha search shortcut taxonomy token views xmlsitemap xmlsitemap_custom xmlsitemap_engines simple_sitemap