Can't restore from only Local site files

When I tried to import a zip file of my local site that I grabbed from last night’s Time Machine backup, I got the error “Please try again with a compatible ZIP file.”

I noticed that none of the Time Machine backups have a SQL folder inside the App folder. Only

I put a ton of hours into the site already and I thought I was covered by Time Machine. Am I screwed or is that sql folder hiding somewhere? TIA


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


System Details

  • Local Version: 9.1.0+6719

  • Operating System (OS) and OS version: Sonoma 14.6.1 (23G93)


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 l
Uploading: Screenshot 2024-10-28 at 3.19.48 PM.png…
ogs 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.

Hey @Spacemonkey5

You can always import what you have manually in order to get things going again. Steps are here:

Manually Import a Local Site

Hi @Nick-B, I can’t do the manual process because Local WP didn’t create a SQL folder in my App folder. Where do I find my sql database files? Are they file type .sqlite?

Hi @Nick-B, I can’t because I don’t have a SQL folder. Can you point me to where LocalWP stores the database files?

Looking back at your screenshot, @Spacemonkey5, it might be missing. Under app, there should be a SQL folder along with the public one that contains your DB. If you can’t find the DB elsewhere, you might only be able to restore the site’s content.

For future work you might also store a site copy using our Cloud Backups or take a manual backup to store somewhere.

Cloud Backups

Backup a Local Site

Okay. I’m fine with restoring the site’s content. I used a template so I’m mainly concerned with getting back what I wrote.

(1) How do I restore the site content with no SQL database, please?

(2) Where else would I look for the DB? What would the default file name format be?

I will absolutely use cloud backup going forward. :face_exhaling:

You’ll have to spin up a new, blank site in Local and then manually import what you do have into that site. You can use some of the same steps outlined in that link from my original comment.

Ok I’ll give it a go. Thx!

Where else would I look for the DB? What would the default file name format be?

1 Like

You could just try searching your machine it’s possible it got shifted. It should just be local.sql and typically is just inside a folder marked sql within the app directory.

Hmm. Would it be called .sqlite?

A spotlight search did find a file named “data-local.sqlite” buried in my Mac user library folder…

——-

(For future readers, it’s not in the main directory Library. It’s in User (the username I login to my Mac with) Library. Here’s the path:

Finder > Go menu > (hold down option key to show) Library > Group Containers > group.apple.com.reminders > Container_v1 > stores.

That wouldn’t be it @Spacemonkey5. Likely just a configuration folder but you could always open it in a text editor and check the contents.

1 Like

Hi Nick, I followed the instructions and replaced the wp-content folder. The site won’t load and logging into WordPress shows that none of the pages nor articles are there.

Next step?

Hey @Spacemonkey5

Correct a lot of that stuff unfortunately is likely lost with the database since your pages and posts are stored there. Your WP-Content is going to contain things like your plugins, themes, and media uploads. So even though you can recover some things, unfortunately there is going to be a lot of rework unless you’re able to recover pieces of the site from elsewhere. Does the site exist live anywhere? Or has it every been backed up to another server or device?

Hi Nick, I have hourly backups on an externa hard drive. Definitely thought I was covered. A sql folder was not created by Local in any backup. The new site I just set up doesn’t have one either. I feel like the Local software failed me, by not creating that folder. Any suggestions would be super appreciated.

Hourly backups how? Are these taken using Local’s native export feature or a backup plugin? Or is this still just reliant on the Time Machine workflow? I know this doesn’t help now, but in the future I would simply use Local’s export feature for a full site export zip to save to your external drive.

Searching the forums I’m finding a lot of users who have run into the same problem with Time Machine not saving the SQL folder so it seems it may not be that reliable of a backup method.

Have you ever pushed or migrated the the site to any server or host?

Thanks for your help. I’ll do that going forward.

Any idea why LocalWP isn’t creating a SQL folder for the brand new site?

To clarify is this with Time Machine or are you saying when you create a new site, and then use Local’s export feature no database is generated?

Never pushed/migrated.

I’m now using Google Drive as my Local site path. When I open the App folder there, there’s still no Sql folder. Exporting from Local does create one.

You’ll want to use Local’s native export, or a plugin like WP Migrate Lite (which is free) to create a full site export zip and then save that to an external drive. Or you can use our Cloud Backups feature. Those will be your best options to ensure you’re creating an actual full site backup.

Is there a way to scrape the actual content (what I wrote) from the wp-content folder files? Even if I can recapture it in a .txt file, that’s better than nothing.

I did install WP Migrate and I know about Export in Local now. Both ways I have to initiate the exports manually, correct?