DEV Community

Nevin Katz
Nevin Katz

Posted on

Returning to a Drupal 7/9 Migration — with Paragraphs

After a week of migrating our multisite system from D8 to D9 on our test server, I am now shifting to migrating another site from Drupal 7 to Drupal 9. Thankfully, this is just one site and not a multisite system. It is primarily used as a content management service so that both Android apps and Powershell applications can pull down and organize content with a series of GET requests. That said, there are a few complexities: It uses the Group module, which allows us to assign content permissions based on project teams. It also has a custom module that allows us to simulate how particular activities will look in a mobile app. Finally, the videos use the media module so those may have to be re-added.

I started migration tests back in March 2021 and then put the whole thing on pause when it became clear that a lot of changes to both content and configuration would be happening.

Now I am back in it. My first step is to refresh my local setup based on our production site. Then I will be turning off all the modules we will not need again in order to simplify the migration process.

Paragraphs

Because this is a fairly simple site, we get a lot of mileage out of Drupal's out-of-the-box graphic user interface. That said, we do need to write custom scripts to migrate paragraphs. For those new to paragraphs, they are essentially "fields of fields." The paragraphs modules is similar to the Field Collection module except that it is compatible with Drupal 8 and 9.

After a lot of effort, I was able to get a paragraphs migration protocol working back in the Spring, and since then, we have had a proliferation in the number of paragraph types - and the nodes that use them - on our live site. So I will be writing additional scripts that will move over all those new paragraphs and their nodes to D9. We may also have to re-add some videos.

That's about it for now. If you develop in Drupal and are curious as to how this goes, check back here for further updates.

Discussion (0)