# Can't Import my Local Export

**URL:** <https://community.localwp.com/t/cant-import-my-local-export/46956>\
**Category:** Support\
**Created:** [February 4, 2025, 11:23pm UTC](https://community.localwp.com/t/cant-import-my-local-export/46956 "2025-02-04T23:23:53Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![ColinD](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/colind/32/4495_2.png) [@ColinD](https://community.localwp.com/u/ColinD)\
**Post date:** [February 4, 2025, 11:23pm UTC](https://community.localwp.com/t/cant-import-my-local-export/46956/1 "2025-02-04T23:23:53Z")

</div>

### What issue or error are you experiencing?

I have a number of old sites that I developed on Local. To free up HD space, I used Local’s Export function to generate a .zip file and stored them. Now I want to import them to Local. When I do that, the import fails and say try with a valid .zip file.

I’ve instead created a basic local site and uncompressed the .zip file. However, in /app/sql there are two sql files for each table (schema and data)

How can I import the db?

* * *

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

* * *

### System Details

- **Local Version:**

- **Operating System (OS) and OS version:**  
Mac 15.3

* * *

### Local Logs

Attach your Local Logs here ([Help Doc - Retrieving Local’s Log](https://localwp.com/help-docs/troubleshooting/retrieving-locals-log-file/))

* * *

_ **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.

---

<div class="post-metadata">

**Author:** ![Nick-B](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/nick-b/32/16140_2.png) [@Nick-B](https://community.localwp.com/u/Nick-B)\
**Post date:** [February 5, 2025, 3:34pm UTC](https://community.localwp.com/t/cant-import-my-local-export/46956/2 "2025-02-05T15:34:13Z")

</div>

Hi @ColinD

If you Start your site in Local, and then click on the Database tab, you can click on Open AdminerEvo to access your database and import files directly in there.

---

<div class="post-metadata">

**Author:** ![ColinD](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/colind/32/4495_2.png) [@ColinD](https://community.localwp.com/u/ColinD)\
**Post date:** [February 5, 2025, 3:46pm UTC](https://community.localwp.com/t/cant-import-my-local-export/46956/3 "2025-02-05T15:46:20Z")

</div>

I tried that but every file generates an error. For example that the row already exists for the data sql file and a different one for the schema sql files.

Any ideas?

Thanks  
Colin

---

<div class="post-metadata">

**Author:** ![Nick-B](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/nick-b/32/16140_2.png) [@Nick-B](https://community.localwp.com/u/Nick-B)\
**Post date:** [February 5, 2025, 3:57pm UTC](https://community.localwp.com/t/cant-import-my-local-export/46956/4 "2025-02-05T15:57:38Z")

</div>

How old were these sites @ColinD?

Do any of them have anything in their contents like extra site backups or db backups?

---

<div class="post-metadata">

**Author:** ![ColinD](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/colind/32/4495_2.png) [@ColinD](https://community.localwp.com/u/ColinD)\
**Post date:** [February 5, 2025, 4:09pm UTC](https://community.localwp.com/t/cant-import-my-local-export/46956/5 "2025-02-05T16:09:25Z")

</div>

They’re all more than 5 years old. No, I assumed when I exported the site via Local’s export feature that I was getting a usable sql dump.

Thanks  
Colin

---

<div class="post-metadata">

**Author:** ![Nick-B](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/nick-b/32/16140_2.png) [@Nick-B](https://community.localwp.com/u/Nick-B)\
**Post date:** [February 5, 2025, 4:35pm UTC](https://community.localwp.com/t/cant-import-my-local-export/46956/6 "2025-02-05T16:35:03Z")

</div>

Okay thank you @ColinD - There are some key differences between Local going back that far that could be causing some issue here. Additionally I’m assuming when the sites were exported they were on older versions of WP/PHP/MySQL, etc.

I’ll check with our team on this but could you share a Local Log with us as well here?

[Retrieving Local’s Log File](https://localwp.com/help-docs/troubleshooting/retrieving-locals-log-file/#download-local-logs)

---

<div class="post-metadata">

**Author:** ![ColinD](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/colind/32/4495_2.png) [@ColinD](https://community.localwp.com/u/ColinD)\
**Post date:** [February 5, 2025, 5:11pm UTC](https://community.localwp.com/t/cant-import-my-local-export/46956/7 "2025-02-05T17:11:04Z")

</div>

I ran another import and then generated the log file. Attached is the log file.

When I run the import, it seems to be unzipping the file and setting up a Local site. Then it says “updating environment” (or something like that), asks me for admin permission to alter the hosts file. After that it shows that it is importing each of the sql files from the directory. Once complete it shows a message in the lower right “Please try again with a valid .zip file” (or something like that) and the status changes to “Deleting” and it asks again for admin access to revert the hosts file.

Colin

> **(attachments)**
>
> [local-logs.zip](https://community.localwp.com/uploads/short-url/s8Xejcc1cPaVQhEOUn0J2EToSDg.zip) (1.36 MB)

---

<div class="post-metadata">

**Author:** ![Nick-B](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/nick-b/32/16140_2.png) [@Nick-B](https://community.localwp.com/u/Nick-B)\
**Post date:** [February 5, 2025, 6:08pm UTC](https://community.localwp.com/t/cant-import-my-local-export/46956/9 "2025-02-05T18:08:43Z")

</div>

Hey @ColinD - When you try importing the zip are you used the Preferred Local site configuration? If so could you try selecting the oldest version of PHP available? I believe it is 7.3.5 right now. There is an error in your log that might point to a compatibility issue there.

If that doesn’t work, then it might be the WordPress version also. Do you remember by chance about what version of WP these sites would have been on?

---

<div class="post-metadata">

**Author:** ![ColinD](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/colind/32/4495_2.png) [@ColinD](https://community.localwp.com/u/ColinD)\
**Post date:** [February 5, 2025, 9:49pm UTC](https://community.localwp.com/t/cant-import-my-local-export/46956/10 "2025-02-05T21:49:13Z")

</div>

Awesome. I ran the import with the oldest PHP and SQL and it sort of worked. it imported all the tables but without the proper prefix (posts rather than wp\_posts, options rather than wp\_options) But I was able to drop all the default tables and alter the imported tables to have the proper prefix and I seem to be functioning.

Thanks so much for your help.

Colin

---

<div class="post-metadata">

**Author:** ![Nick-B](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/nick-b/32/16140_2.png) [@Nick-B](https://community.localwp.com/u/Nick-B)\
**Post date:** [February 5, 2025, 10:03pm UTC](https://community.localwp.com/t/cant-import-my-local-export/46956/11 "2025-02-05T22:03:52Z")

</div>

Glad that at least got you on the way @ColinD! Thank you for following up and sharing an update 💚

---

<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:** [May 6, 2025, 10:04pm UTC](https://community.localwp.com/t/cant-import-my-local-export/46956/12 "2025-05-06T22:04:43Z")

</div>

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