Upgrade from Drupal 6 to 8

So you have this bloody old Drupal 6 website and have to upgrade it to Drupal 8?

Good news! It’s possible to transfer most of your data!

Easy solution -> start watching this incredible video (Video is removed from YouTube :( see comment)
In theory they are right!

My experiences in detail

I work on my local PC (OSX/MAMP)
Task is a German D6 Website, 6 years old with 1500 nodes, 10000 taxonomy terms, 10 content-types, 50+ contrib modules, a handmade theme … in short, a usual suspect

  • I created a copy of the old Drupal 6 database and imported it in my local MySQL
  • I installed a fresh Drupal 8
  • I installed and enabled the following modules
    https://www.drupal.org/project/migrate_upgrade
    https://www.drupal.org/project/migrate_tools
    https://www.drupal.org/project/migrate_plus
  • Upgrade UI-Version
    I navigated to http://localhost/newdrupal8/upgrade and fill the form. Upgrade worked but slow
  • Drush-version
    Next time I tried drush which is way faster
    drush migrate-upgrade --legacy-db-url=mysql://user:pass@localhost/d6db --legacy-root=http://olddrupal6site.com

If the database is bigger than 100 MB it seems to be better to use drush.

Problems (and a solution)

  • After the first run in the Upgrade UI, all nodes, menu links, users and taxonomy were in the new db but the nodes were without field values
  • Second try …  (new drupal 8, etc)
    Migration this time with drush – faster but same result
  • few more tries with different configuration ideas (don’t know anymore :)
  • fifth try – Idea: Hey, the source is a German site, may be it’s about language :) #hope
Hagens-MacBook-Air:htdocs hagengraf$ drush dl drupal-8 --select
 Choose one of the available releases for drupal:
 [0]  :  Cancel
 [1]  :  8.1.x-dev    -  2016-Jan-08  -  Development
 [2]  :  8.0.2        -  2016-Jan-06  -  Supported, Recommended
 [3]  :  8.0.0-beta2  -  2014-Oct-15  -  Security

D8 Installation in German

some problems in settings.php (no MySQL connection). Don’t related to the upgrade (it was deep in the night).
Solution:

$databases['default']['default'] = array (
 'database' => 'd8',
 'username' => 'root',
 'password' => 'root',
 'prefix' => '',
 'host' => '127.0.0.1',
 'unix_socket' => '/Applications/MAMP/tmp/mysql/mysql.sock',
 'port' => '3306',
 'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql',
 'driver' => 'mysql',
 );

configuration with the following commands

cd drupal-8.0.2/
drush status
 drush dl migrate_upgrade, migrate_tools
 drush en migrate_upgrade, migrate_tools
 drush dl admin_toolbar
 drush en admin_toolbar_tools, admin_toolbar
 drush migrate-upgrade --legacy-db-url=mysql://root:root@localhost/fnd6 --legacy-root=http://olddrupal6site.de

and … all data imported but still  no files, no body field values

  • next try

I download the files from the old d6 site to http://localhost/old (5GB) and tried again …

Files were now imported, body field values too, but mysterious messages were shown in drush output. Still no values  were shown in a node (just the title).

Missing filter plugin: filter_null. [error]
Missing filter plugin: filter_null. [error]
Missing filter plugin: filter_null. [error]
  • next try – same problem than before – discovered possible reasons
    https://www.drupal.org/node/2397469
    https://www.drupal.org/node/2015313

Deactivated caption filter, php filter, image assist filter in old site (now in the local version)

  • next try – hurrah :)
    everything works! 180 MB data imported
    but
  • no views
  • lots of contrib modules missing (ads, iframes, sliders, all the stuff clients need :) …)
  • different handling for images and a lot of topics
  • theme doesn’t work anymore

But hey … most of the data is imported!

Now the works starts on the rest :)


 

If you need help with your Drupal 6 to 8 upgrade …
ping me


by

Tags:

Comments

3 responses to “Upgrade from Drupal 6 to 8”

  1. Carsten Hager Avatar
    Carsten Hager

    Hey Hagen,

    wie ist dein Workflow für 6 -> 8.1, da sich in 8.1 ja einiges ab Upgradeprozess geändert hat.

    Gruß Carsten

    1. Hagen Graf Avatar

      Habe noch keinen. Bisher gab es keine Nachfrage und meine alten Drupal 6 Seites sind alle auf 8.x.

  2. Spek Regg Avatar

    VIDEO link is broken

Leave a Reply

Leave a Reply