Moving a Local site to a different path

Moving a Local site isn’t super easy, but it’s at least easy to follow these instructions :slight_smile:

Here’s how to move a site to a different path:

  1. Copy the site folder(s) to the new locations you’d like them
  2. Checkout/clone the Local Add-on repo for Volumes - https://github.com/getflywheel/local-addon-volumes to the ~/Library/Application Support/Local by Flywheel/addons/local-addon-volumes folder
  3. Enable the add-on ‘Volumes Manager’ then restart Local
  4. Go into each site that you want to move and start them
  5. Go to the More > Volumes section of the site info
  6. Adjust the directory path easily by changing the values on the left side, then click ‘Remap Volumes’
  7. Local will provision the updated mappings
  8. After doing this for all of the sites you want to move/change, edit the ~/Library/Application Support/Local by Flywheel/sites.json file and adjust the ‘path’ strings there too.

Now you’ve moved the site location, and you haven’t completely borked your Local config!

7 Likes

Just completed steps 1-7 and both of my sites are working from their new folders. However, I went to complete the final step but it seems that I don’t have a Local by Flywheel folder within Application Support. Does anyone know if and where it has been moved? With the changes and upgrades that have happened recently, is this step still necessary?

Thanks!

I just double checked, the folder is there for me but I don’t know if it recently changed for new installs. Sorry :frowning:

Hi @dgadwa,

Are you on macOS or Windows? If it’s missing on macOS then that’s very odd. :thinking:

If you’re on Windows, you can find Local’s configuration files in %AppData%\Local by Flywheel\

My apologies. I misread the path that sc0ttkclark specified. The correct path is the root of the user folder/Library/Application Support as opposed to the root directory of the drive/Library/Application Support.

1 Like

Having followed this process on a PC I get stuck at number 6 when browsing for directory…

“Sorry! You must provide a path in /Users”

When I manually update path I get…

“Sorry! There were invalid paths provided. Please ensure that all paths have a valid source and destination. Also, all source paths must begin with either /Users or /Volumes.”

Any ideas on how I can get over this issue?

This is after having issues where it failed to start local machine and most recently “Error! Container is missing.”

Im starting to wish i hand jumped from XAMP! :frowning:

@sc0ttkclark Thank you for the steps. Just curious though wouldn’t export and re-import be a bit easier than this? Is there a reason you opted not to do that?

@mansabadman,

The Volumes add-on is currently incompatible with Windows.

Can you try exporting then re-importing like @jb510 mentioned?

1 Like

Hi Clay,

How will that fix the issue?

Surely the export will export the path info too? and then when it’s reimported it will have the same path?

It is worth to mention that each directory path has a different end, which met the end of the container destination.

for instance:
~/path/WP_folder/log/mysql if the container destination reads /var/log/mysql.

1 Like

When you re-import the site you can change the name, domain, path, as well as the environment settings.

Thank you. Worked for me!

Just an update on step 6: the site needs to be started to bring up the ‘Remap Volumes’ button.

2 Likes

Yes this worked for me but having to go through this process for no reason was a real ball ache. So much so that on top of this issue and the SSL issue it made more sense to go back to WAMP.

Many thanks for this walkthrough

This seems to look a lot like my problem. I described how I solved it by exporting an empty project replacing the content of the zip file using the id from the container from sites.json and updating the information in local-site.json in the archive then import for Local to add the files and data.

@zitzmrefly thanks, i was like why is that button still disabled?

Why is this still not possible with a simple click on a button? I cannot export the site anymore, because it’s moved and changed, just let me update the path entries. Ridiculous.

1 Like

Is this still the right procedure? I’m not able to get this working.

Hi @lebleu29

Can you explain more about what you’re trying to do, and roadblocks you’ve encountered? Also what is your OS and Local version?

@Nick-B
On Macs/~nix computers (and from what I’ve read Winwoes too) directory paths with spaces cannot be read
The default “~Local Sites” path is ridiculous and needs to be changed. If you need to run anything npm yarn gulp etc you get a big fail.
When you have xxGB of uploads and secure dependencies moving the directory is a humungous PITA. That’s the roadblock.