All my sites are gone, need help urgently

Bug Summary

For a week, all my local sites have disappeared from the platform and I can’t get them back. I tried several solutions that I found on the community forum, such as updating VirtualBox, exporting and importing my sites in zip, clearing my browser cache, but nothing works. When I import my sites in zip, they appear in an old version dating from two months ago, and some plugins and features don’t work. Some sites even fall into error when importing. I don’t understand what’s going on and I’m very worried about losing my work. Can you please help me solve this problem? Thank you in advance for your reply.

Steps to reproduce

When I import a site it tells me that there is an error because the zip file does not respect the correct format.
When I open my local by flywheel too, none of my sites show up

Environment Info

Describe your environment.
I am using new local update. For the sites I no longer remember what their versions were since I can no longer access them.

Supporting info

Please provide your Local Log. See this Community Forum post for instructions on how to do so:

Include any screenshots or video recordings of the issue to help others reproduce.
Here is my log in the local-lightning.log local-lightning.log (392.0 KB)

Hi @Yohannes

Did your machine go through any updates or did you update Local recently?

Are you able to create a new blank site in Local and access that?

What error messages are you seeing when importing or accessing site features? Feel free to send screenshots.

1 Like

Hi @Yohannes -

@Nick-B asked you some great questions - I see that you updated Local to the next version.

You may want to try downgrading Local and seeing if you sites return. You can follow this guide to do so:

Let me know if this helps!

Sam

Hi @Nick-B and sammunoz thank you for your help,I’ll start by responding to Nick-B:
Yes I’ve done 1 or 2 updates to Local, since then I feel like it’s due to that, or maybe my lack of space on my computer that I’m in trying to solve by buying an SSD hard drive that arrives today normally.
For the moment I saw that it is possible to create a new site only it is now the only one in the list.

For the error message what I can see is: Please try again with a compatible zip file. But I think is not the real problem. In the log here is what they put me :
{“stack”:“Error: ENOSPC: no space left on device, write”,“level”:“warn”,“message”:“Unable to import site.”,“timestamp”:“2023-04-12T08:31:39.394Z”}

{“thread”:“main”,“class”:“DeleteSiteService”,“errno”:-4055,“syscall”:“write”,“code”:“ENOSPC”,“level”:“warn”,“message”:“Unable to delete site.ENOSPC: no space left on device, write”,“stack”:“Error: ENOSPC: no space left on device, write\n at Object.writeSync (node:fs:888:3)\n at Object.writeFileSync (node:fs:2176:26)\n at Object.writeFileSync (%%appPath%%\node_modules\jsonfile\index.js:117:13)\n at Object.outputJsonSync (%%appPath%%\node_modules\fs-extra\lib\json\output-json-sync.js:15:12)\n at UserData.set (%%appPath%%\main\app\UserData.js:1:682)\n at SiteDataService.deleteSite (%%appPath%%\main\sites\SiteDataService.js:95:4115)\n at DeleteSiteService. (%%appPath%%\main\sites\DeleteSiteService.js:1:2682)\n at Generator.next ()\n at n (%%appPath%%\main\sites\DeleteSiteService.js:1:132)”,“timestamp”:“2023-04-12T08:31:39.400Z”}

{“thread”:“main”,“class”:“DeleteSiteService”,“level”:“warn”,“message”:“Could not trash”,“timestamp”:“2023-04-12T08:31:46.459Z”}

The space could explain the import problem but I don’t know if it could cause the problem that does not recognize my files what do you think compared to that?:face_with_monocle:

Hi @sambrockway , thanks for the advice, I’ll try to follow the instructions you provided to see if it works. I’ll get back to you to let you know if it worked.
Thanks again for your help :slight_smile: Also I looked at a few lines that caught my attention in the log file (even though I don’t really know how to read this type of files), there seems to be a lot of lines saying that there is Database connection issues, I don’t know if this can help in fixing this bug.
Yohannes

Hi @Nick-B, yes I’ve done 1 or 2 updates to Local, since then I feel like it’s due to that, or maybe my lack of space on my computer that I’m in trying to solve by buying an SSD hard drive that arrives today normally.
For the moment I saw that it is possible to create a new site only it is now the only one in the list.

For the error message what I can see is: Please try again with a compatible zip file. But I think is not the real problem. In the log here is what they put me
{“stack”:“Error: ENOSPC: no space left on device, write”,“level”:“warn”,“message”:“Unable to import site.”,“timestamp”:“2023-04-12T08:31:39.394Z”}

{“thread”:“main”,“class”:“DeleteSiteService”,“errno”:-4055,“syscall”:“write”,“code”:“ENOSPC”,“level”:“warn”,“message”:“Unable to delete site.ENOSPC: no space left on device, write”,“stack”:“Error: ENOSPC: no space left on device, write\n at Object.writeSync (node:fs:888:3)\n at Object.writeFileSync (node:fs:2176:26)\n at Object.writeFileSync (%%appPath%%\node_modules\jsonfile\index.js:117:13)\n at Object.outputJsonSync (%%appPath%%\node_modules\fs-extra\lib\json\output-json-sync.js:15:12)\n at UserData.set (%%appPath%%\main\app\UserData.js:1:682)\n at SiteDataService.deleteSite (%%appPath%%\main\sites\SiteDataService.js:95:4115)\n at DeleteSiteService. (%%appPath%%\main\sites\DeleteSiteService.js:1:2682)\n at Generator.next ()\n at n (%%appPath%%\main\sites\DeleteSiteService.js:1:132)”,“timestamp”:“2023-04-12T08:31:39.400Z”}

{“thread”:“main”,“class”:“DeleteSiteService”,“level”:“warn”,“message”:“Could not trash”,“timestamp”:“2023-04-12T08:31:46.459Z”}

The space could explain the import problem but I don’t know if it could cause the problem that does not recognize my files what do you think compared to that


?

Hi @Yohannes

The space could definitely be causing issues. Are you able to delete anything or offload any items to cloud or external storage so that you have some space freed up?

I also noticed you’re getting an error about an incompatible zip file. That could indicate something wrong with the files within. All Local really needs to import a site is a wp-content and sql. So you could try creating a new zip with just those and seeing if it will import. Otherwise I can provide some steps for a more manual import method, however if the disk still has no space available it likely will fail.

1 Like

Hello @Nick-B , I had a lot of trouble implementing the proposed solutions, I had to put my whole pc in order these last few days. I was able to downgrade Local like she asked @sambrockway and it turns out that it did nothing. I do not really know what to do anymore…
I have the impression that it is a matter of database which is not connected but I do not know how to do that… Do you have other ideas to solve the problem?

Hi @Yohannes

If you’re still unable to import a site and are getting the incompatible zip file message, you may need to try some more manual steps like the ones below here:

  • Unzip the site 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
  • If that works, now Search and replace the domains. wp search-replace ’ https://production.com ’ ‘http:mylocalsite.local’

Ok thank you, Nick, I will test this solution today and I’ll let you know what happened.
I may have trouble doing the database part and wp search-replace because I’ve never done it, only I’ll look, I might ask you some additional questions about it by the way if need :slight_smile:

1 Like

Hi @Yohannes Good luck! Keep us posted if you hit any other snags.

Where do you find the database folder, I came across it not long ago but I looked around and can’t find it. Can you tell me where to find it?

If you have files from a previous Local site there should be a database file within the App directory.

It wouldn’t be in this folder for example, which one would it be? if so, how do we connect the database to the site?

Hi @Yohannes

You’ll need to move that folder into the root of the new site you’ve created. Then you’ll use Open Site Shell on that same site to import it with the command.