Restoring a local site failing

What issue or error are you experiencing?

I wanted to rename my local site folder and followed the instructions incorrectly. I deleted the site from local preserving the site folder. then I tried creating a new site but using the old site’s folder as the content once it was created. of course, that didn’t work. I realized too late I should have done an export to preserve the sites database. since I didn’t do that, is there any way to recover my previous local site? I have a lot of work in there. My local DB is mysql and I’m on a mac.


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


System Details

MacBook Pro M1 Max config

  • Local Version:
    Version 8.3.2+6660

  • Operating System (OS) and OS version:
    macOS Sonoma 14.4


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.

I tried importing from my local site folder per Import/Export a WordPress Site - Local

This almost works but at I end up with the error "Please try again with a compatible ZIP file. Looks like it fails on the step of trying to import the database from local.sql.

somehow looks like I don’t have a valid local.sql file. not sure how that got corrupted but it is. any other way to recover the db? maybe directly from mysql?

Hi @xjones

On that same help document you linked above there are manual steps to import your WP Content and SQL separately via a more manual workflow. Have you tried that?

I did. I ended up concluding my database was lost for good. While it was a PITA, lesson learned. I spent yesterday recreating what I had done over the weekend so all good now. I won’t attempt anything so potentially destructive without multiple redundant backups in the future.

1 Like

Thank you for the follow up @xjones I’m glad you were able to get back to a good spot even though it required a lot of manual effort. We have a built in Cloud Backups feature you can use for saving your work but at any time you can also use the native export to save a copy. The plugin WP Migrate Lite is also another great free option for generating a full site or DB export as well.