# Importing remote site to local fails on SQL file

**URL:** <https://community.localwp.com/t/importing-remote-site-to-local-fails-on-sql-file/18512>\
**Category:** Support\
**Tags:** installation, site-import, mysql-8\
**Created:** [April 5, 2020, 7:05pm UTC](https://community.localwp.com/t/importing-remote-site-to-local-fails-on-sql-file/18512 "2020-04-05T19:05:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![commadelimited](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/commadelimited/32/10114_2.png) [@commadelimited](https://community.localwp.com/u/commadelimited)\
**Post date:** [April 5, 2020, 7:05pm UTC](https://community.localwp.com/t/importing-remote-site-to-local-fails-on-sql-file/18512/1 "2020-04-05T19:05:49Z")

</div>

Greetings,

I’m trying to get my remote WP site running locally. I’ve done this before on my old computer (and had it running perfectly), but now that I’ve switched over I’d like to do it here as well.

I’m running Local 5.2.8x2711

- I’ve copied all of my wp-content files.
- I’ve created a dump of my database (my host uses [MySqlBackup.NET](http://MySqlBackup.NET))
- I’ve placed the wp-content folder, and the SQL file side side by side and zipped them together.
- I’ve dragged the resulting ZIP file onto Local, and it starts the process.
- I’ve named the site, and selected “Preferred” as the setup mode.
- Local processes everything until it gets to the database setup at which time it displays the error message below.

![Screen_Shot_2020-04-05_at_1_59_38_PM](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/2X/e/e77392725f2f8ca1eed73cee8451dce460973b1d.png)

Here’s the log files from `/Logs/local-lightning.log`

```auto
{"thread":"main","class":"Process","process":"nginx","pid":42095,"level":"info","message":"Killing process","timestamp":"2020-04-05T18:59:59.059Z"}
{"thread":"main","class":"Process","process":"mailhog","pid":42096,"level":"info","message":"Killing process","timestamp":"2020-04-05T18:59:59.059Z"}
{"thread":"main","class":"Process","process":"phpFpm","pid":42098,"level":"info","message":"Killing process","timestamp":"2020-04-05T18:59:59.059Z"}
{"thread":"main","class":"Process","process":"mysql","pid":42099,"level":"info","message":"Killing process","timestamp":"2020-04-05T18:59:59.059Z"}
{"thread":"main","class":"ImporterGeneric","level":"info","message":"Removing /var/folders/sf/mlnsk7dd36v2rp5rk983vxzr0000gn/T/local-by-flywheel-zokxPauTQH","timestamp":"2020-04-05T18:59:59.059Z"}
{"stack":"Error: Local was unable to import the following SQL files: \n\n• /app/sql/remote-database.sql\n at ImporterGeneric.<anonymous> (/Applications/Local.app/Contents/Resources/app.asar/main/importer/Importer.js:1:18153)\n at Generator.next (<anonymous>)\n at _0x5105ed (/Applications/Local.app/Contents/Resources/app.asar/main/importer/Importer.js:1:3850)\n at processTicksAndRejections (internal/process/task_queues.js:85:5)","level":"warn","message":"Unable to import site.","timestamp":"2020-04-05T18:59:59.059Z"}
{"thread":"main","class":"DeleteSiteService","message":"Deleting /Users/amatthews/Library/Application Support/Local/run/qneiRZIHN","level":"info","timestamp":"2020-04-05T18:59:59.103Z"}
{"thread":"main","class":"HostsFileService","level":"info","message":"Updating hosts with","timestamp":"2020-04-05T19:00:00.063Z"}
{"thread":"main","class":"HostsFileService","stdout":"Updating hosts file at /etc/hosts\nUpdated hosts file at /etc/hosts\n","stderr":"","level":"info","message":"Updated hosts.","timestamp":"2020-04-05T19:00:04.399Z"}

```

---

<div class="post-metadata">

**Author:** ![mattwhosthat](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/mattwhosthat/32/7794_2.png) [@mattwhosthat](https://community.localwp.com/u/mattwhosthat)\
**Post date:** [April 7, 2020, 2:27pm UTC](https://community.localwp.com/t/importing-remote-site-to-local-fails-on-sql-file/18512/2 "2020-04-07T14:27:31Z")

</div>

It sounds like Local isn’t recognizing the SQL file as a genuine SQL for some reason. Have you opened it up to verify that it appears to be a proper SQL file?

The log entry refers to `remote-database.sql` but your screenshot ends with a xxx86f.sql file, which doesn’t quite line up together. If you’re truncating the log file, it may help more to attach the entire file here (which works better on the site since email attachments won’t reach the forum).

Also, I’d recommend making sure you don’t have any other SQL files buried in your wp-content folder (from backup plugins, etc).

---

<div class="post-metadata">

**Author:** ![system](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/system/32/1_2.png) [@system](https://community.localwp.com/u/system)\
**Post date:** [July 6, 2020, 2:27pm UTC](https://community.localwp.com/t/importing-remote-site-to-local-fails-on-sql-file/18512/3 "2020-07-06T14:27:34Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
