Static WordPress Community

Can my Lokl sites be saved?

I wanted to spin up Lokl on my Win 10 machine tonight so I clicked on the Start Menu, started to type “docker”, and hit Return.

All of the sudden I saw what I believe was a Docker installation screen with a moving progress bar. Maybe this was a routine update. But usually updates have some warning. This just seemed to happen.

And I hadn’t checked that the correct item from the Start Menu was highlighted when before I’d pressed Enter so I got worried that I was somehow writing over my existing Docker install and I’d lose my sites and quickly closed the program.

I then went to try to open Docker Desktop but I could not find it. I could find evidence to it in my file directory but I cannot start it or see it in Add / Remove Programs. I restarted my machine but I still cannot see Docker Desktop.

I can still see my static sites. I have 4x WP sites in the folder C:\Users\Tom\Local Sites

Each WP site has the sub-folders: app, conf, logs

I’m hoping I can reinstall docker and re-load these sites using Lokl but I’m not sure if this can be done or how. If anyone has any advice I’d greatly appreciate it. Thank you!

Were those sites originally created with https://lokl.dev? There’s video on that homepage, where you can see how sites are created with Lokl in a terminal/command line. They don’t get saved to the path you mentioned, so I’m wondering if perhaps you used another tool to create those, ie Local by Flywheel?

Leon, thanks for the reply.

Your suspicion is correct. I did do an experiment with Local by Flywheel before switching to Lokl. I guess they’re remnants from that.

I’m having trouble finding the Lokl files. Can you tell me where you think I should be looking? Or if you think there’s anything to look for?

1 Like

Hi @tjc4,

Lucky guess :smiley: - glad we confirmed it!

So, with Lokl, it uses Docker behind the scenes. Docker tends to store all it’s “images” and “containers” in one place. That said, I have no idea where that is, let’s have a look!

OK, I think this will find that out:

  • run docker info command (via CLI)
  • look for Docker Root Dir
  • on my system, it shows /var/lib/docker

There is a way to take a “snapshot” of Docker sites, using docker commit, but this probably isn’t what you’re looking for.

As you’ll likely be only changing WordPress files, you can use Lokl’s built-in backup command, which will save a copy of the site files and database to a location on your computer (temp directory by default). Easier than this, though, would be to just use a regular WordPress backup plugin - one that uploads to something like OneDrive/Google Drive or generates a zip file that you can download onto your computer. Those are going to be the easiest ways to start with, then can choose to dive deeper into how Lokl works if ever needed.

Please let me know any other questions as they pop up. This is still a relatively new project, so I haven’t fielded a lot of user questions yet.

@leonstafford sorry for the delay in getting back to you. Good news. The sites are fine - just needed to reinstall Docker and they re-appeared.

I ran the docker info command. Here’s my Docker Root Dir: /var/lib/docker

But I don’t think that’s a windows directory (which would explain why I couldn’t find my sites). I think that’s directory inside a virtual machine on my computer.

Docker desktop says my disk image location is: C:\ProgramData\DockerDesktop\vm-data

But the only file in that folder is DockerDesktop.vhdx so I guess all my Docker data / all sites are smushed together.

when I try the Lokl backup function this is what happens:
image

previously we discussed the WPBackitUp plugin and my troubles getting that to work

I’d love to find a plugin solution that works but I can’t find a free one that works and though I’m willing to pay I don’t want to pay for the premium version of that plugin to work if I can’t get the free version to work.

any backup suggestions? I need to figure out Lokl backup or may need start thinking about trying something else

Hi @tjc4,

Sorry for the late reply.

There are some ways to make your Windows Docker/shell experience smoother, but also require an investment in time (ie, using WSL).

For site migrations, I hear often about people’s love of the Duplicator plugin: Duplicator – WordPress Migration Plugin – WordPress plugin | WordPress.org

1million+ reviews, with 5 star average. May suit your needs.

This reply may have come too late to keep you working with Lokl. Unfortunately, I don’t have a Windows test environment these days, so I don’t have any quick win solutions for you.