Migrating from WordPress to Drupal

Well.

  1. export WordPress to XML.
  2. clean the XML file. Use BBEdit to find weird invisible characters, etc.
  3. in Drupal:
    • install WordPress Migrate 8.x-3.x-dev (composer require drupal/wordpress_migrate:3.x-dev@dev)
    • make sure that the function createEntityFromPluginin /usr/local/www/apache24/data/newcognosce/web/modules/wordpress_migrate/src/WordPressMigrationGenerator.php contains the line "$entity_array['migration_tags'] = $migration_plugin->getMigrationTags();" and NOT the line " $entity_array['migration_tags'] = $migration_plugin->get('migration tags');"
  4. add a database setting called $databases['migrate']['default'] to settings.php, with all the remaining fields identical to the default database setting.
  5. pkg install php80-xmlreader and php80-xmlwriter