Main Content

How to import a site into Local when the import fails.

Local Computer Setup

I’ve been using Local by Flywheel for years now and I love it. It’s a great environment for spinning up & developing WordPress sites. Better yet, you don’t have to use it with Flywheel hosting, you can just use it develop WordPress locally.

Now that Local “Lightning” is out, Local is much faster. It’s a great upgrade to what is usually an environment that just works, however it’s a different app.

Moving from Local by Flywheel to Local should be as easy as exporting one site and importing it back in. However, sometimes that doesn’t work.

Local Import Error
Local Import Error

It seems that the import/export functionality expects standard WordPress sites with standard wp-config.php files. Even though things worked fine in Local by Flywheel, they will not always import into Local.

The good news is you can work around import errors with a few manual steps.

  1. Start the site in Local by Flywheel.
  2. Export the site from Local By Flywheel – This is just a backup incase things go wrong.
  3. Export the database separately via Adminer.
  4. Stop the site in Local by Flywheel.
  5. Find the site folder on your computer and rename it to something different.
  6. Open Local.
  7. Create a new site in Local with the same name it had in Local by Flywheel.
  8. Find the new site folder on your computer and rename to something different.
  9. Find the old site folder from step 5 and rename it back.
  10. Import the database via Adminer.

That should do it. As long as you kept the site name correct, the site should now be transferred to Local.

In my option, Local should be able to detect and transfer files between apps without having to import and export. Especially when importing runs scripts which is where it fails most of the time. Maybe some day they’ll figure out a better import process.

1 Response

  1. Pat says:

    Thanks for this. In my case, I can’t open Local by Flywheel (M1 Mac, Big Sur 11.2) so can’t Export to later Import using Local. Is there a way to manually move the files from the existing user/Local sites folder and, if so, to where?

Leave a Reply