My notes from migrating a Drupal 7 site to Drupal 8.

  • Backup db
  • Backup files
  • Disabling modules that can be re-added after
  • Enabling admin toolbar / disabled toolbar
  • Drush update
  • Dl drupal 8 and extract to folder
  • Create new db (phpMyAdmin or whatever)
  • Create a vhost and point it to the folder (in MAMP or whatever)
  • Navigate to the vhost in the browser and the installation script will run
  • Standard installation
  • added xdebug.max_nesting_level = 100 to php.ini for the php version I’m using in MAMP PRO Navigate File -> Edit Template -> PHP -> PHP 5.xx -> php.ini
  • Changed cache module to OPcache in MAMP Pro
  • Installation completed successfully.
  • Upgrade drush
  • Came across this problem https://drupal.stackexchange.com/questions/201060/does-drush-need-to-be-installed-as-root – fixed
  • Came across this issue – https://modulesunraveled.com/blog/drush-not-working-mamp-heres-how-fix-it fixed as per the instructions
  • Installed https://www.drupal.org/project/migrate_upgrade via drus

drush migrate-upgrade --legacy-db-key=default --legacy-root=/Applications/MAMP/htdocs/northamptonpartnershiphomes

--legacy-db-url=mysql://hartleyvoicescms:MTwGCDT5Ah74smSW@localhost/hartleyvoicescms

drush migrate-upgrade —legacy-db --legacy-root=/Applications/MAMP/htdocs/northamptonpartnershiphomes

  • problems with .sock – https://drupal.stackexchange.com/questions/99446/ive-got-pdoexception-sqlstatehy000-2002-no-such-file-or-directory-when-u

  • https://drupal.stackexchange.com/questions/185364/upgrading-from-drupal-7-to-8-with-drupal-upgrade-a-bug

  • https://www.drupal.org/project/drupal/releases/8.2.4
  • https://www.drupal.org/docs/8/upgrade/upgrade-using-drush – drush migrate module docs
  • https://www.drupal.org/project/migrate_upgrade – drush migrate module
  • https://www.youtube.com/watch?v=XOV8VNTAvek – install drupal 8
  • https://www.youtube.com/watch?v=sEOvYaBFj64 – introduction to drupal 8
  • http://docs.drush.org/en/master/install/ – drush docs
  • https://stackoverflow.com/questions/4145667/how-to-override-the-path-of-php-to-use-the-mamp-path/10653443#10653443 – Getting system to use MAMP version of PHP (could explain issue with Drush, when installed globally uses default version of PHP outside of MAMP.)

cd /Users/hywel
nano .bash_profile

  • Add the following lines:
    export MAMP_PHP=/Applications/MAMP/bin/php/php7.0.0/bin

export PATH="$MAMP_PHP:$PATH"

  • https://www.zodiacmedia.co.uk/blog/migrating-from-drupal7-to-drupal8
  • https://www.drupal.org/project/drupalmoduleupgrader – attempts to upgrade module from drupal 7 to drupal 8 – also works on themes

##Theming

  • https://www.drupal.org/project/twigify – converts drupal 7 theme to twig
  • https://www.drupal.org/docs/8/theming-drupal-8/adding-stylesheets-css-and-javascript-js-to-a-drupal-8-theme
  • Check that the right tags are pulling in the header stuff
  • eg

<css-placeholder token="{{ placeholder_token }}">
&lt;js-placeholder token=&quot;{{ placeholder_token }}&quot;&gt;

##Debugging

  • https://knpuniversity.com/screencast/drupal8-under-the-hood/debugging