Migrating multisite to multisite new domain name

UpdraftPlus Home Forums Paid support forum – UpdraftPlus backup plugin Migrating multisite to multisite new domain name

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #322887
    neesha
    Participant

    I am trying to migrate a multisite when one site is deleted and one site remains. I have created a new multisite installation of WordPress on the new hosting account. I install UpdraftPlus Premium on both sites, take a backup on the old hosting account and send it to the new WP installation on the new hosting account. Then I restore with the “search and replace” option selected to change the domain name. When the migration completes, and I select visit site from the dashboard I get “error connecting to database” (I don’t remember the exact verbage and can’t replicate it without going through the migration again). I check the database and see that some relics of the old site URLs remain so I try changing them to the new site URL and then get an error message “site no longer available”.

    I have the multisite installed on a subdomain at the new hosting account – could this be the issue? My hosting account had no problem installing multisite on a subdomain, but maybe that’s causing database issues?

    #323122
    Dee Nutbourne
    Moderator

    Hi,

    Does the new multisite share a database with any other sites?

    I’m afraid that you will need to repeat the migration restoration (though the same backup set can be used). You will need to wipe the current database, and ensure that the database details are correct in wp-config.php.

    When restoring, do not include the WP Core section of the backup, if it is there.
    After restoring, if you find that there is still an issue with the URLs, add the following to your wp-config.php file (replacing the example URL with the new URL):

    define('WP_SITEURL', 'https://example.com');
    define('WP_HOME', WP_SITEURL);

    Then, log in and find the database search and replace tool in the UpdraftPlus Advanced Tools tab.
    Enter the old URL in the ‘Search for’ field, and the new URL in the ‘Replace with’ field. Then click ‘Go’.
    Be careful when entering the URLs, as mistakes may break the database.

    Best Wishes,
    David N

    #323234
    neesha
    Participant

    Thanks, David. I tried what you suggested but still get “Error establishing a database connection”, even after changing wp-config.php. So I can’t see the dashboard to do the database search and replace tool. If I go into phpMyAdmin I see that the new url is applied as the siteurl in the “options”, “site”, and “sitemeta” tables… but there are “domain_mapping” and “blogs” tables where the old URLs remain. I hesitate to change these because every time I have in the past the “site is no longer available”

    Any suggestions?

    #323521
    Dee Nutbourne
    Moderator

    Hi,

    The “Error Establishing a database connection” error means that the site cannot access the database at all, rather than there being an issue with the URL.

    The cause is usually a problem with the database details and credentials in the wp-config.php file (e.g. an incorrect database address).

    Otherwise, the database server may be encountering an error. I would recommend asking your server admin/hosts to check the database server error logs.

    Best Wishes,
    David N

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Migrating multisite to multisite new domain name’ is closed to new replies.