 Hello. Hi, everyone. I'm honored to talk today at DrupalCon about content migration into Drupal8. And I think it's time when I can start my presentation. So my name is Irina Zaks. I'm web developer. I'm Drupal developer and I'm open source evangelist. I teach Drupal technology courses at Stanford University. And I also started Fibonacci Web Studio. And this is a company where we're doing advanced web development for research, develop advanced tools for research and academia. In today's presentation, we're going to talk about content migration tools that are available in Drupal8. There's a large number of very important topics that we will not cover today, including world peace. So before diving into actual presentation, I want to give everyone a warning. I made decision to do a live demo. We're entering wilderness. This laptop uses dev tools. My sites use dev tools. Things might and they will break. Also, another great thing is that screenshots that I took two weeks ago are now some of them are obsolete because while we're sitting here and talking, some people downstairs in the sprint launch are coding and submitting patches. So by the time we get home back home to our offices, things will work even better than I show you today. So stay calm and Drupal on. Before we dive into technical things, I want to take a bird's eye view like why we are migrating content. Because the question why is always the most important. We have all kinds of tools, but we need to understand why we're using them. So the mission of the website is to support your organizations. And so sites, organizations change and websites change. They also change with time. People wear different fashion once in a while. And overall, lifetime of the websites is at best four to five years. There's a large number of reasons why you might want to change your site. Some of them are a little bit better. Some of them are not so good. But nonetheless, actual migration starts when you hear words with God budget. So when you are ready to actually start migration, first, as migration experts recommend what you review, what you've got right now, you look at your current website and you document your findings. That will help you a lot. And once you are done with your review, you can need to make lots of big decisions. You want to decide what you keep, what to delete, what to change and what you're going to be adding. And based on these decisions, you have two large paths. One would be if you have lots of good content that you want to keep, then you're looking at what is actual migration. And if you really don't have enough content, not that ideas or something, then you're building the new site. Today, we're going to talk about migrations. Okay? We're going to be using an example of a website for a research center. It had a lot of good content. And we were addressing two major things. One, they had non-responsive theme and then had poor experience for content managers. And for them, preserving everything that they worked through the last decade was very important. They had lots of images, lots of videos. And so for us, content migration was a very big part of the contract. So we put together all kind of our tools and started this Drupal 7 to Drupal 8 migration. One of the problems with Drupal, whenever people ask me which system you would recommend we use, and I say Drupal, I say, well, we can't use Drupal because we can't upgrade. And that is true that early migrations in Drupal from one version to another were real, real adventures. You had to write lots of scripts, you know, this SQL code, which is not exactly very appealing to people who are site builders. By the time when it was 6, when we were migrating Drupal 6 to Drupal 7, it was very routine exercise. We had the process and we had tools. You would set up your new site, you would create your content types, you will set data expert and data import, which was with a good tool set, very well-known exercise, but still it was pretty tedious and very time-consuming. So when we quoted data migration, migration portion was a huge cost. Well, migration from 6 or 7 to 8 is just a pleasant walk in the park. And I have to admit that this upgrade via web interface was one of the most pleasant surprises that Drupal 8 brought to me. And one of the biggest argument to actually move, start moving on to Drupal 8. So in the new system, we can skip three very big steps and very time-consuming. And instead of that, we click one button. And so we do have this one-click migrate and we're going to demo it today. There's actually also module migration that is available in Drupal 8. So we will do comparison because there's one-click upgrade and rollbacks and multiple import. So first we are going to look at the source site where we had very clearly defined content and then we're going to demo how it was actually done. With this, blessings of all the, you know, everything that was blessings I can get today, we're going to dive into the live demo. So this is the old site that is not live anymore with migrated last fall. It had very clearly defined content types, lots of them. We're going to look at the person content type. This is a very typical example of a very typical content type of like almost any website that had all kinds of fields, images, references, date, text, and lots of actual content. And then the form was configured in a particular way, so for ease of editing. So here was our process for migration. We go to my dashboard and pantheon. This is a place where I want to think pantheon for providing ideal tool set that completely like I'm a site builder, I'm working with information architecture. I don't have to know anymore, you know, I don't have to see command line. This provides me great tool set and I click create new site and this is going to tell me what site would you like and I'm going to give it a name and say continue. And within the next five minutes, my site will be built. So one site, this site is built and it's going to be Drupal 8. I get brand new out of the box instance and this is where I will start adding my modules. So lots of modules are now in core, so we don't need to add them. So for the very basic migration, I usually would add admin tool bar just for ease of operation, path auto because I really need to have this path created automatically and then development tool set. And after I add this modules, I'm going to start enabling tools for migration, migrate Drupal and Drupal migrate UI and then once it is done, I go, now I can go here to development and I see this new button that is called upgrade. I click upgrade and it is going to ask me if I want to actually upgrade and I say yes, please import new configuration and content from old site. And here, if everything works correctly, it's going to bring me an opportunity to connect to the old site and this is where I need to enter credentials for the website. So this is one kind of, this is a little bit of a challenge sometimes because if you are site builder and owner of the site content, you would need to find out from your system administrator this four things. So once you, if it actually works, it will allow me to enter credentials and then if you installed completely new website and didn't make any single changes, then you can just continue. But if for example you decide that you want to add another user or you want to upload a log or do anything with this blank site, it will, the Drupal itself will detect that something has happening on the new site and it will say, are you ready to lose any data that's there? And normally you would say yes, let's go ahead. And for some reason it's not really doing what I asked it to do. So we're going to proceed. So once you click the button upgrade, then Drupal will start building at the back things that are called migration paths. And migration paths, there's number of them that come from the core and they will migrate your nodes, your taxonomy, your users. If you had any custom modules on your old website or even if you used like display suite or some other country modules on the Drupal 7 site, Drupal might say I have like missing upgrade paths. And at this point you will say okay whatever unless you are back on developer and it can write yourself this migrate path. And this will be migration customization and that's something that's going to be chapter 3 of this presentation. So for now we're all just site builder will say yes please import new content, add interface and then click button yes and then Drupal will start running actual migration. And you will see this log messages running. And first time when I saw was like oh wait, wait, wait, wait, I can't read that quickly. The good news that all these things are very conveniently recorded in the recent log messages report. And I don't have to oh, let me do it again and again. So now since we got some connection, let's try to actually run this thing and the database password. Now here you need to enter the another beautiful thing that I totally love about this upgrade is that I don't need to figure out what where is my wire dub dub dub doc root because on different hosts it will be at different places. I can simply enter URL of my website and my great model itself knows how to get from the URL to the files. And so well after this all this thing has finished running, we are going to arrive into site that has all the content. So after your migration has been run and completed, you can see here all your log messages that tells you exactly what happened, how many nodes of each content type it upgraded. You can see like what fields were upgraded and on and on and on. And you have right here all the content that you had in your previous website. So great everything is done. We can go get some cup of coffee and send email to our boss that everything is done. We just go home. Well, we're almost done. For example, I can see that I have been, I know that I was migrating people's profiles. I know that conveniently Able starts with A and I know that there was a lot of information in his profile. I saw his picture. I saw his title. But when I go to my new site, I do not see any of that. And that of course is like, oh my gosh, what's going on? So I see picture but not the other things. So what happens unless you have a migration path for form and display suit, which I didn't install because we're doing just basic out of the box, I can see that all the fields are here. However, in Drupal 8 now form display is in core. So with every content type you have form display and all these fields are hidden because we didn't set migration path for display suit. But good news is it takes very little time to move them back and reconfigure form display the way you want it to make sure that your editor experience is consistent that what you want for new site. And in the same way, if you want to simply change display, which most likely you're going to be doing anyway, this is your screen right there. And you can just move things around and save. And things are showing up very consistently. So the summary of this migration is that you've got content is now in your new Drupal 8. It preserves node IDs, which is a big deal because now you don't have to deal with lots of redirects and lost files. It created users and it created roles. It created taxonomies. And so all the work that you were spending on setting up migration is done with promised one click. There are some things that don't work very well with this one click, really one click upgrade. You can't roll back. So we used pantheon as our like, we would set things up, we migrate, we find some errors, and then we have to roll back. The problem with this one time migration is if you're doing continuous development and people are making changes on the life side, while you already migrated something, you can't add these things in. The issue that is not addressed right now is that field collection, field collections, which one of the biggest challenges right now does not have out of the box path. And there is a problem with plain HTML format. It looks differently in so plain text format has changed drastically from Drupal 7 to Drupal 8. I know that my great team is working right now on mitigating this problem and building the path, but it's not contributed yet. And so for our migrations, we converted everything into full HTML, migrated, and then whatever we wanted to do, we could do after that. So if you are doing a migration and you see a particular problem, you have two options. You can write your custom script and just like, okay, we're done. Or you can do a patch and send it back to Drupal.org, which would be a great, great solution. So with all these limitations, we want to have a little bit more tools. And here is the moment when enters drush. We actually, and we want to give people to have an option to have a little bit more options still within web interface. So we need a developer to run one drush command after you've added migrate tools, migrate plus, and migrate manifest. This is your command. As they say, your wish is my command. My wish is I can have rollback migrations at any time, day and night. And then drush says your wish is my command. And this is command you enter. And after that, magically, we have a new thing that's coming, coming in. Now we have a button called execute. This one, no, this is not. So we are getting button that's called migrations. This is interface that Drupal migrate and migrate tools and migrate plus provide for site builders and for people who don't want to deal with command line. This is the place where you can set up your migrations. And I know that my great team is right now working on contributing to core, the ability to integrate, upgrade with migrate. But right now, the only way to get this is to run that drush command. However, great news is that now we already have it still in patches, but there's URL that you can add that you now get this execute button. And this is the button that allows you to actually execute migrations. So you can import things, you can roll back, and you can also stop if like if you get migration of 10,000 nodes and apparently something is wrong, you can stop migration in the middle and then you can reset and clean it up. So when I see import, so in this group of migrations, so this is migration, then there is a migration group. And then I can go into this migration and I'm going to say execute. And this button triggers one at a time, the large migration that you saw happening with one upgrade, like as a whole thing. Now you have the granularity to say, please only import people or please only import research areas or whatever you need to do. And if, for example, you want to stop that migration or you want to roll it back, you have an option to do that. So once migration, it has been completed, I have now here, like all the people in one research area. And let's say there were like large number of change and happened on the original site. Here I can say roll back please. And if everything works as expected, then it will roll back and remove all the nodes. And I will have maybe clean interface with only the nodes that I need. And then I can run these migrations back and forth as many times as I need. So these are, if you want to get these execute buttons, you need to get these patches. They have not been pushed out of the live versions yet, but they are there. And this is migration options that you get once you add these patches. Migrate manifest module also allows your option to customize migration even to a more granularity by adding manifests. So manifest is the list of, the list of migrations that you saw over there, they are all listed in the file called manifest yaml. And so if you want to intercept migration, you can create your own manifest for a particular type. So you want to do news differently. And then, for example, this famous field text format, this is where you need to write your own custom plugin. Or for example, you're manipulating really your own data. This is where you can intercept it and write your own scripts. And the biggest news that I would like to announce for the next two minutes that I still have for presentation is that feeds module is actually working now. It has been released, I think in February. It has now CSV import working for Drupal 8. Temporary UI is working. And we have discussions for feeds and we have weekly meetup where technical discussions are happening. This URL is listed on the Drupal.org module feeds. So everyone is quarterly invited to come and participate and ask questions and test patches. And we're going to have sprints tomorrow at 11 o'clock downstairs in the sprint room. And if anybody wants to participate, please join us for feeds and migrate sprint. So this is the summary of your migration with ease from Drupal 7 to Drupal 8. One time migration is your content is ready. Enable migrate and tools plus if you need to go back and forth or use feeds to bring additional content. So with this said, I would like to thank everyone for coming to this presentation. Join us for sprints and thank you very much.