Change of computer

As my computer was running too slow, I had my hard drive removed and replaced with an SSD one.
I had to reinstall local by flywheel and I have access to the now external hard drive with a folder with the info of my website but I have no idea how to reinstall it…
I have read that I should have used the export function and then import the file on the new drive but it’s too late for that procedure…
Can someone please help me ? I am not a computer person… :frowning:

Hi tristanic,

First off, you didn’t do anything wrong. You simply did what you would do with any other app. With almost all other apps, you can simply reinstall the program on your new drive or computer and it will pick up your files right where you left off.

Local is different. It requires you to export the site on the old installation and reimport it on the new one. In theory, that’s simple. In practice, not so much. As in your case, you might not be aware that you have to do this. Or maybe your HDD or SSD crashed and you have no way of recovering it. You probably have a backup, but how do you export the site from your crashed HDD? You can’t.

The developers of Local should have seen this coming and offered a simple way to reimport an existing site, either from the original drive, as in your case, or from a Time Machine (MacOS) or Acronis (Windows) backup. I’ve made this point before, and it seems like it should be a top priority. Ideally, it should be drag and drop simple: just drag the site folder onto the app and boom, you’re done.

That said, here are some things you can try to recover your site.

  1. If you were using a backup plugin on your site (e.g., UpdraftPlus, BackWPUp, etc.) one thing you could do would be to create a new site in Local with the same name, and then use the backup plugin to restore the old files and database. I’ve done things like this before and it should work. This is the first thing I would try.

  2. As far as I’m aware, the official way to recover from a situation like yours is given by Clay in this thread. You have to create a new site with the same name, replace the folder with your existing site, and then get Local to reimport the database files.

  1. If you weren’t using a backup plugin and solution 2 doesn’t work, all the files in your site, including a copy of the database, are saved in the site folder. The site files (theme, etc) are in mysite/app/public. The database is in mysite/app/sql. The only problem is that Local breaks the database up into separate files by table. What you would have to do is reassemble the tables into a whole database. I’ve never done that, but I’m sure there’s a way. It probably involves creating a blank database and importing the tables one by one. Once you have a whole database you can create a new site, copy over the files in the mysite/app/public/wp-content folder and reimport the database. I know it sounds like a lot of work but it’s all doable.

Clay may have some better ideas but these are mine.

Good luck!

Hello Iflyer,
First of all, THANK YOU so much for taking the time to answer.
I am not sure if there was a backup plugin but when I open the site folder, there are 4 folders inside (app, backups, conf and log). Does the backups folder mean that there was a backup plugin ?

I have tried the solution given by Clay but here is what I get :

C:\Users\PC>“C:\Users\PC\AppData\Local\Programs\local-by-flywheel\resources\extraResources\virtual-machine\vendor\docker\windows\docker.exe” exec -it 6b17b536658eb100c0a146a7591d550b791721984f6a04fdbbbe5979194c8a93 /bin/bash
root@6b17b536658e:/# myloader -p root -d /app/sql --overwrite-tables --database local

** (myloader:550): CRITICAL **: the specified directory is not a mydumper backup

Would you have any idea what I’m doing wrong ?
Thank you AGAIN for your help…

1 Like

Can anyone help ? I’m still stuck…

Hey Tristan,

Can you browse your /Local Sites/yoursite/app/sql folder and see if there is a bunch of .sql files in it? It should have… The message you shared shows that myloader thinks this is not a sql dump folder.

I am not sure if there was a backup plugin but when I open the site folder, there are 4 folders inside (app, backups, conf and log). Does the backups folder mean that there was a backup plugin ?

No, I don’t recall what might be this folder, maybe if you made a Container update (from 1.2 to 1.3 or something) but the Wordpress plugins works only beyond the /Local Sites/yoursite/app/public folder…
But what do you see inside this “backup” folder?