apps/docs/content/troubleshooting/transfer-edge-function-from-one-project-to-another.mdx
This guide shows how you can transfer your Edge Functions from one project to another using the Supabase CLI or the Supabase Dashboard.
To follow through this guide, you need the following:
supabase login
This should open up a web page with an access code. Copy the code, paste it in your terminal, and hit enter.
supabase functions list --project-ref your_project_ref
supabase functions download function_name --project-ref your_project_ref
Repeat this step to download multiple functions.
This downloads the function(s) into supabase/functions. You can view the downloaded function(s) by running
ls supabase/functions
supabase link --project-ref your_target_project_ref
supabase functions deploy --project-ref your_target_project_ref
This deploys all functions within the supabase/functions to the target project. You can confirm by checking your Edge Functions on the project dashboard
In the source project, navigate to Edge Functions from the side menu
Using the Download button, download your desired function as zip:
In the target project, navigate to Edge Functions from the side menu
Click on the Deploy a new function button, select Via Editor operation
Drag and drop your downloaded function (the zip function from step 2) into the editor
Add your function name and click on the Deploy function button to deploy the function:
With this, you can transfer your edge functions between your Supabase projects.