Importing remote site to local fails on SQL file


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)
  • 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.


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

{"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/\n    at (<anonymous>)\n    at _0x5105ed (/Applications/\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"}

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).

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