Can't import zips from export that Local created!

What issue or error are you experiencing?

I created an export of a site I’m working on as a restore point, and subsequently had to use it as a restore point after I realized I’d made a mistake with some content getting deleted. So I tried to re-import the site using the zip file that Local created, but it says “Please try again with a compatible zip file.” This blows my mind, as Local made the zip file - so how can it be incompatible? I’ve been trying to solve this for hours, and tried a bunch of different variables such as changing the server from Apache to nginx, changing directories, changing local host name, etc. Nothing has worked.

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

Try to import the Local-generated zip file and it doesn’t work.

System Details

  • Local Version: Whatever the latest is, I updated today (8/11/23)

  • Operating System (OS) and OS version: Windows 10

Local Logs

Attach your Local Logs here (Help Doc - Retrieving Local’s Log)

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 @Moisture0676!

That’s definitely strange. When you were developing the site did you use any backup plugins or create any backups of the DB? Something may have gotten added to the site that is confusing Local when you try to bring it back in.

Well, there should be a couple ways to work around this. You could try unzipping the file, and narrowing it down to just WP-Content and SQL files and zipping those back up to import.

You could attempt a more manual import also. 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 ' ' 'http:mylocalsite.local'

How do I structure the zip file if I want to narrow it down to just WP-content and the SQL files?

I created a zip file with the bare minimums and got it to launch in Local. Problem is that every link is a 404. The admin interface seems to be alright, and the front page loads with all the correct images/CSS/etc. But if I click on anything, it gives me a 404. On top of that, if I try to update a post or page, I get an error that says “Updating failed. The response is not a valid JSON response.”

EDIT: I solved this by going to the Permalinks section in Settings and simply clicking “Save” - which updated the permalink structure automatically.

1 Like

Glad to hear you got things fixed up @Moisture0676! Thank you for coming back and letting us know. Happy Developing :green_heart:

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