How to open site created with previous version of Local?

I’m trying to reopen an old site created with Local in 2019. According to local.site.json, it was version 2.2.4.

When I drag the site’s root folder to Local, I get an error message that reads “Sorry! We couldn’t figure out what to do with the import file provided. Please extract it manually.”

When I use my Mac’s native compression utility to zip the file and then drop the zip archive into Local, I get an error message that says “Please try again with a compatible Zip file”.

Solutions?


What steps can be taken to replicate the issue? Feel free to include screenshots, videos, etc


System Details

Local Version 7.1.2+6410

MacOS 12.6.2

Local Logs

Attach your Local Logs here (Help Doc - Retrieving Local’s Log)
local-logs.zip (21.4 KB)


Security Reminder
Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.

Hi @radionowhere!

You could attempt a more manual import. The steps would look like this:

  • Unzip the file in a common location, like the desktop
  • Create a new, blank site in Local. Use whatever username/password you like since you’ll overwrite the DB with this site archive’s dump.
  • Copy the wp-content folder from the unzipped location to this newly created site’s location
  • Copy the correct SQL dump to the site root.
  • Within Local, open the site shell
  • Import the dump with wp db import <dumpfile>
  • If that works, now Search and replace the domains. wp search-replace ' https://production.com ' 'http:mylocalsite.local'

Thx, Nick-B! A few questions:

  • can you tell me what the correct SQL dump is? There are 34 SQL files in the source site’s “sql” folder (as shown in the attached screenshot)
  • once I’ve got that file, what’s the correct syntax/filepath for importing in Terminal?

You could just be using the whole SQL file under the app directory. Everything in the SQL file are your individual DB tables and what not.

Great, thx!

Can you tell me how to " * Import the dump with wp db import <dumpfile>"?

Once the SQL file is your site root, you can click on the Open Site Shell button in your Local app to spin up a terminal box. That’s where you’ll run the import command!

Thx. But what’s the syntax of the import command? When I drop “wp db import ” into Terminal, I get “bash: syntax error near unexpected token `newline’”, I assume because in place of “dumpfile” I need an actual filepath?

Correct! To be more accurate your command would look like wp db import filename. Sorry if that was confusing!

But am i trying to import all 35 sql files? Sorry to be so confused! Could you tell me, based on the screenshot above, what my version of “wp db import filename” should look like?

Apologies for the confusion! I’m not sure why the DB is broken down like that but it predates my experience with Local. I think we will need to change gears here and do something different. What you’ll need to do is Start your site, go to the Database tab, and then Open Adminer. Once in there you can click on Import on the left-hand side and import each of those SQL files. It will be 1 at a time, but that might be the easiest way to get this updated. The good news is once you have it done this way you shouldn’t ever have to do it again!

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