Migrating from WordPress to Drupal 8

Overview

Last weekend I came up short with things to do and with a Drupal 8 release right around the corner I decided to get on with moving my blog across from WordPress. TLDR; It went well :)

Migrate API

Pretty old news at this point for most but Drupal 8 now has Migrate in core. Outside of cores needs for an upgrade path there is an easy to use API for migrating to Drupal from any platform. You could even use it to move between two non-Drupal platforms if you so wanted.

Installing Drush on VentraIP

  1. Install composer
    cd ~ && mkdir bin && curl -sS https://getcomposer.org/installer | php -- --install-dir=/home2/YOU_SITE_NAME/bin --filename=composer
  2. Install Drush
    composer global require drush/drush:6.*
  3. php -i | grep php.ini and then copy the default php.ini into ~/.drush - Make ~/.drush folder if it does not exist.
  4. Remove exec and any other functions drush uses from the disabled_func line in php.ini
  5. Ensure the Composer bin folder is in your $PATH.

Adding a Date Filter to Views When Using Custom Fields

I recently exposed some custom database tables to views using hook_views_data() which as usual was a pleasant experience, until I wanted to use the date filter that the Date module provides. This isn't creating a filter on your field, it's the field in the list that looks like Date (node). The word "node" in brackets is referring to the base table that will be used for the date filter, this allows you to compare multiple dates from the same table. So the hook you're looking for: hook_date_views_extra_tables().