3

I have a Drupal8 site and I've installed the Wordpress Migrate module and it's dependencies for migrating a Wordpress site to Drupal8.

When I start to import the exported XML file from Wordpress, I get this error:

The website encountered an unexpected error. Please try again later.

When I checked the error messages pages I found this:

Drupal\Core\Database\ConnectionNotDefinedException: The specified database connection is not defined: migrate in Drupal\Core\Database\Database::openConnection() (line 361 of /media/mosama/Content/test_poc/drupal8_2/core/lib/Drupal/Core/Database/Database.php).

Any solution for this?

4

Solved! By adding anothe data base configuration with ['migrate'] in settings.php under the default database like this

$databases['migrate']['default'] = array (
  'database' => 'NAME',
  'username' => 'USER',
  'password' => 'PASS',
  'prefix' => '',
  'host' => 'localhost',
  'port' => '3306',
  'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql',
  'driver' => 'mysql',
);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.