How can I restore a site from a Local site folder?

Note: Local has come a long way since this was first posted and mostly just works for importing sites. Have a look at our help doc for more current information:

https://getflywheel.com/wordpress-support/how-to-import-a-wordpress-site-into-local/

You probably want the above link, but the below information is being kept for history:


In case you are seeing a “Container Missing” error or are just needing to restore a Local site from an existing Local site folder, here’s how:

Note: There must be SQL files present in app/sql in order for this to work. Otherwise, the database won’t be able to be restored.

  1. Rename all of the folders in your Local Sites folder to something like SITE-backup
  2. If the site still exists in Local with a “Container Missing” error, delete it.
  3. Create new sites for each using the existing domains and paths. So, if it was site before, you’ll use site again
  4. Browse back to the Local Sites folder and delete the newly created site folder and rename SITE-backup back to site. This is done because you can’t create sites over site folders that already exist.
  5. Right-click on the site in Local and go to “Open Site SSH”
  6. Enter myloader -p root -d /app/sql --overwrite-tables --database local … This will load in the SQL files in /app/sql
  7. Check the site and make sure it looks right
15 Likes
Re-importing a site
Does Removing a Virtual Machine in VirtualBox Result in Loosing Databases?
Local 2.06 Problems to Error! Container is missing. You will need to restore this site from a backup or previous export
Updated to 2.0.4 and now local gets stuck in a loop starting up
Re-import existing site
Restoring site after reinstalling Local by FlyWheel
Relink / Import site
Import DB through CLI
2.0.3 stuck starting local machine
Pulling previous "Local Sites" into new Local setup
Can't restore a Local site
Urgent! Lost weeks of work - hung on local machine start
Move a Local site to another computer (under extraneous circumstances!)
Local Site will not start
Import existing site using Local 2.2.0
How to restore from just the files?
Container is missing after manually updating to 2.1.1
HOW to restore site after Flywheel upgrade
Annoying VirtualBox Setup On Flywheel Startup
Importing a site and config file not transferring
Local 2.06 Problems to Error! Container is missing. You will need to restore this site from a backup or previous export
WordPress Installation Fails and can't connect to Database
"Starting Local Machine" Hang... Twice
Stuck in "Starting Local Machine..." (MacOS 10.13.2 / Local 2.1.2)
Auto update now all sites say container missing
Migrating sites after clean install
Auto update now all sites say container missing
Missing Container - Auto Update Issue
Error connection to database when trying to restore a site
Can't Install the WordPress after the new update. 3.0.1
Container is missing - can't working anymore
Reintall a Local Site
Just about to deliver site and now "Error establishing a database connection"
Local by Flywheel not opening after Accidentally Deleting the .docker files
Restoring Local site doesn't work
Urgent! Lost weeks of work - hung on local machine start
Local Site will not start
2.1.1 Installation errors
Stuck on 'Starting...' after clicking 'Start Site' on all sites
Upgrade to 2.1 on Windows 10 not working, Stuck at "Starting New Machine"
How to restore a Local site export?
Can't "import" site after deleting it (BUT leaving the files there)
Local don't list Local Sites
Re-instate my local sites to LocalByFlywheel from backup?
Importing local website to flywheel does not include pages, posts and users
Recovering database after computer breaks
Change of computer
Local hung on "Starting Local Machine"
Regenerating Docker Machine TLS Certificates
How to restore database from app/sql
503 Error on all sites front-end since latest update
Version 2.2 Prerelease, websites not working
How to restore Local from TimeMachine
Error! Container is missing. You will need to restore this site from a backup or previous export
Cannot restore my website after having to move from one computer to another
Cannot restore my website after having to move from one computer to another
How can I import a site into Local by Flywheel
Local Flywheel Does Not Open