Drupal 8 vdd and csv migration

March 7, 2016

Okay, I know it is awful practice to put 2 things into one article, but I didn't want to write two tbh, so I will keep this tidy, and you can grab out what you need.

VDD (aka"Vagrant Drupal Development")

I am a longtime user if the VLAD setup for building quick drupal boxes. When you work on several projects, each hosted on a different server, with it's own dependencies, you do not want the risk of updating php, and everything else breaking. Therefore, vagrant is a must have, and whilst the ideal scenario is that it is identical in structure (as opposed to scale) of your live servers, this is rarely possible for small teams or solo developers. This is where things like VLAD or VDD come in. Vlad is great, but the reason I tried out VDD is just because VLAD does not play nice with D8 yet. You can get it setup for the most part, but getting drush 8 on there and behaving proved a little fiddly, and so, time for something new.

VDD is a very simple setup, and in its current state, appears to follow the mantra of 'doing one thing, and doing it well'. You can setup your sites in a json file, then just vagrant up. You end up with the site running, and drush 8 at its side. Then simply jump online and download drupal 8, connecting to your db with the never secure, root:root.

Pros: it works fast, and with D8

Cons: It appears to workfast by not allowing lots of config changes/overrides

Migrating csv content into Drupal8

So, I am pretty fresh when it comes to Drupal8, I really want to get some sites going, but until I have a client willing to take the jump, all I can do is play with my own projects, which doesn't produce the same unexpected requirements. One requirement I recently got asked was whether I could scrape an old flat html site, and migrate that into a new D8 site. So, first stop irc, where it appeared that feeds was not ready to pull in csv files, and migrate was unsure. But I persevered, and found a few interesting articles, and a module which does the job. The first of which was a quick example, without having to write any code

This works nicely, but be warned, you will need drush to do any migrations. I thought I could just do it with drupal console, then spend a while ripping out my hair before destroying a vagrant box (hence the previous half of this post). Once you have done this, and happy with a general outcome, you can now move on to creating you Drupal 8 module, which need be no more complicated than an info file and a config yml file at this point. If you want to do clever things you may want more parsers, but for now, there is no need. For some tips, you can usually grab some pointers from this series

Some main takeaways and gotchase for this article