• Resolved jimdown

    (@jimdown)


    I have moved hosting companies but kept my website live, and am trying to import from Drupal to WordPress.
    I have retrieved the parameters from the settings.php file and input into the import fields. However when I try and test the connection to the Drupal site I get the following messages:
    === START test_database 2018-01-09 21:37:13 ===
    [ERROR] Couldn’t connect to the Drupal database. Please check your parameters. And be sure the WordPress server can access the Drupal database.

    SQLSTATE[HY000] [2002] No such file or directory

    Please read the FAQ for the solution.
    === END test_database 2018-01-09 21:37:13 ===

    As a novice I am unsure what to do here?

Viewing 14 replies - 1 through 14 (of 14 total)
  • Thread Starter jimdown

    (@jimdown)

    Think I had an error with the username/password but am now getting timeout errors and nothing imports.

    Any suggestions?

    Thanks

    Plugin Author Kerfred

    (@kerfred)

    Which error message do you get?

    Thread Starter jimdown

    (@jimdown)

    Hi Kerfred, I get the following:

    [ERROR] Couldn’t connect to the Drupal database. Please check your parameters. And be sure the WordPress server can access the Drupal database.

    SQLSTATE[HY000] [2002] Connection timed out

    Thanks

    Thread Starter jimdown

    (@jimdown)

    Just wanted to check: should the URL of the live Drupal web site simply be the domain name i.e. https://www.domainname.no?

    Plugin Author Kerfred

    (@kerfred)

    The URL field must contain the URL of the live Drupal site (i.e. https://www.domainname.no) It is used to import the images.

    But this is not the cause of your problem.
    If Drupal and WordPress are not installed on the same host, you can do this:
    – export the Drupal database to a SQL file (with phpMyAdmin for example)
    – import this SQL file on the same database as WordPress
    – run the migration by using WordPress database credentials (host, user, password, database) instead of the Drupal ones in the plugin settings.

    Thread Starter jimdown

    (@jimdown)

    Ah ok thank you.

    The websites are with different providers and are therefore on different hosts.

    I will try what you have suggested later today.

    I assume that I need to copy the exported SQL database onto the WordPress host before running the migration?

    Plugin Author Kerfred

    (@kerfred)

    Yes.

    Thread Starter jimdown

    (@jimdown)

    One final question: where do I find the WordPress database credentials (host, user, password, database) – is it in the settings.php file for the WP site?

    Plugin Author Kerfred

    (@kerfred)

    wp-config.php

    Thread Starter jimdown

    (@jimdown)

    Ok I have exported the sql database from Drupal and copied on the WP host. Should it go into a specific directory as I tried the root and it didn’t work? I get the following message:
    “Couldn’t connect to the Drupal database. Please check your parameters. And be sure the WordPress server can access the Drupal database.”

    I used the parameters (database, username, password, host) from the file wp-config.php

    Thread Starter jimdown

    (@jimdown)

    Checked the prefix and added, now get the message:
    Warning: PDO::__construct(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/2/w/waxingexpert/www/wp-content/plugins/fg-drupal-to-wp/admin/class-fg-drupal-to-wp-admin.php on line 494
    {“status”:”Error”,”message”:”Connection failed
    See the errors in the log below”}

    Plugin Author Kerfred

    (@kerfred)

    Did you import the Drupal database on the WordPress database?

    What did you enter in the database settings?

    Thread Starter jimdown

    (@jimdown)

    I exported the sql database on host 1 and copied onto the WP location on host 2. I then tried to run the import, as suggested, using the WP settings as follows:

    url: test.mydomainname.no
    username: mylogin
    password: mypassword
    host: mydomain.mysql.domenshop.no
    prefix: ogz1s

    Does this help?

    Plugin Author Kerfred

    (@kerfred)

    If you have copied the Drupal database on host 2, then you must use the host 2 credentials to access the database.

    If this still doesn’t work, please open a ticket on https://www.fredericgilles.net/support/ and we will investigate.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Import Problem’ is closed to new replies.