Last month we took the challenge to update drupal.pt from Drupal 6 to Drupal 8.1.
Drupal.pt is the website for the portuguese Drupal community and was originally developed in 2010, slightly before our first drupalcamp.
The website contains some information pages, details about events in the community, links to user profiles, social media information and sites developed in Portugal in Drupal.
Our original proposal was to start the update in a presentation in Lisbon in one of our last meetups which are hold every wednesday in the last week of the month.
Here was our rough guide on how we did migrate it:
- Look to content types and vocabulary used and verify they are still valid. Sites change overtime, so is normal that IA can change as well. In our case we still wanted almost all content types and taxonomy.
- Check contributed modules used and verify which ones are required. Bear in mind that the majority of the modules are still not available for Drupal 8. In our case here is the list of modules we ended up with:
- Start a new D8 site from scratch and enable all the required modules. We end up using a new module with all the needed modules as dependencies. This allowed us to reinstall when needed during the migration . You can find the module here: https://github.com/drupalportugal/drupal-pt.org/blob/8.x-dev/docroot/modules/custom/drupalportugal_custom/drupalportugal_custom.info.yml
- We also defined all needed modules and libraries as part of composer.json so it is easy to update in the future when contributed modules and core get new releases.
- After enabling all the modules we are ready to migrate. For that we enabled the core module migrate_drupal and migrate_drupal_ui and visited the route in /upgrade which guided us through the process of defining old database credentials, select which entities to migrate and proceed with the migration. This automatically migrate the following entities (content and configuration):
- Content types
- Menu items
- We hit a couple of hiccups in the migration but we were able to solve the majority without any major issues namely date and user fields. Patch in https://www.drupal.org/node/2674152 solved it.
- After that we had to fix menu items and blocks, create views from scratch and finish other details regarding site building and configuration.
- At the same time we created a new theme, inheriting from Bartik and customize just the css we needed.
- When we were happy with the result we exported configuration to sync directory to guarantee we can easily upgrade configuration in the future.
And voilá, site is ready and live! You can find all of its source code in https://github.com/drupalportugal/drupal-pt.org
This same post was published in portuguese in drupal.pt