• According to https://www.wpexplorer.com/migrating-wordpress-website/ and in order to migrate a WP website to another host, one needs to export the WP MySQL database. What I have is a “complete” (7 GB) backup of the files from my site. However, the old service provider is now closed and I don’t have access to it any more. So I can’t export the WP MySQL database.

    I can see that in wp-config.php the DB_HOST is mysql.

    Where is the mysql database most probably located? Outside public_html, right? So I probably don’t have that database (how to check?). I have a new webhotel and I copied all the 7 GB files there, but it of course says “Error establishing a database connection” when trying to open the page.

    What exactly does that database contain?

    Is it possible to somehow get my website up and running in this case?

Viewing 8 replies - 1 through 8 (of 8 total)
  • You’ll need your database to restore or migrate the site.

    Two ideas here…

    You might find a copy of your database in the file directory used by your backup plugin (you did have a good backup plugin installed didn’t you?). If so it might be there in your files copy and you can use that.

    If not then maybe your old host has a backup copy still on hand. It won’t hurt to ask.

    Barring the above…

    You might try setting the IP to your old host in place of the ‘localhost’ in WP-config… that’s a very long shot… if your database is still there you might be able to access it… if it will allow remote access even.

    If that works then do a database backup immediately because it won’t last long once the account is closed or gone.

    Barring that…

    You might find some of your old content (possibly all) still present over at the Wayback Machine. https://archive.org/web/.

    I have rebuilt websites using the Wayback Machine… It’s not fun but it can be done.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    In the backup file set, is there a file with the extension .sql or .sql.gz ?

    Thread Starter distill

    (@distill)

    There is a .sql file (17 MB) and I used MySQL Workbench to see what it includes (it looks fine as far as I can tell).

    On my new web server I do have phMyAdmin and MySQL Databases. They are both working. In fact, phpMyAdmin already had the database available on the left side. I didn’t do any import, it was there automatically. (Did it do some auto-scan, I don’t know?)

    The instruction page I mentioned says that I should add a user in MySQL Databases. I tried, but it accepts only 8 letters for the username. And there is a prefix xxxxxxx_ (name changed). But in my wp-config.php the username is much longer than what MySQL Databases accepts.

    There is already one user in MySQL Databases but it’s a different user than defined in wp-config.php.

    What to try next?

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    That 17MB .sql file is the content from your old site. Import it into your new site’s database to recover the old site’s content.

    Thread Starter distill

    (@distill)

    I did the import according to my instruction link. It said succesful (544 something done, it’s not in English so I don’t know the translation).

    But, nothing seem to have changed. I changed the DNS earlier and I think that has already updated and ok (the error message shown to visitors changed after chaging that). The site’s error message is still “Error establishing a database connection”. I also changed the wp-config.php to match a new user added by me in MySQL Databases. It does say: Current Databases, my_databasename, 17 MB, my_user (with all privileges). What might be wrong?

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    << Error establishing a database connection <<

    One of the DB parameters in your wp-config.php file is incorect.

    Thread Starter distill

    (@distill)

    Now I have changed 3 values in my wp-config.php: DB_NAME, DB_USER, DB_HOST. DB_HOST was previously “mysql” but I guess it was only suitable for the old server. On this new one it should be localhost. And did “work”, now I get much further.

    I can go to mysite.com/wp-admin and it now gives “503 Service Temporarily Unavailable”. It now tries accessing the WP redirections which is good.

    I don’t know how to fix this error. Deactivating plugins and switching to default theme was suggested, but I can’t access the backend. Before using my webhotel’s expensive support for this, is there something I can do to troubleshoot that error? Any logs or additional information would be very useful.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Errors like this are logged. Check the error log on your server. If you can’t find the log, please contact your host.

    Meantime, enable wp_debug and wp_debug_log and after an error, look at wp-content/debug.log to see if anything gets logged there. https://codex.www.ads-software.com/Debugging_in_WordPress

    You can also try this: Please attempt to disable all plugins, and use one of the default (Twenty*) themes. If the problem goes away, enable them one by one to identify the source of your troubles.

    If you cannot access wp-admin, there are other ways to deactivate plugins.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Copying a site without access to the MySQL export’ is closed to new replies.