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