How to Clone an Azure Web App: Download, Modify, and Deploy to Another App
Sometimes you need to create a copy of an existing Azure Web App β maybe to test a new feature, build a staging environment, or duplicate production with minor changes. This article shows how to download everything, modify locally, and deploy to another Azure Web App.
Option 1: Use "Clone App" (Fastest if your plan supports it)
Azure App Service includes a built-in Clone app feature available on Standard and higher tiers. It duplicates files, app settings, connection strings, and more.
Steps:
- Open your Web App in Azure Portal
- Go to Development Tools β Clone app
- Select the new Web App name, resource group and app service plan
- Confirm and create
Note: Not all configurations support Clone App, and some features may not copy across (particularly some Linux stacks).
Option 2: Download, Modify, and Upload Using Kudu (Full Control)
If you want complete control or your plan doesn't support Clone App, use Kudu.
Step 1 β Download the Web App Files via Kudu
Open Kudu for your app: https://<your-app>.scm.azurewebsites.net
- In Azure Portal, open the Web App
- Go to Development Tools β Advanced Tools β Go
- In Kudu, open Debug Console β CMD
- Navigate to: site β wwwroot
- Click the Download icon to get a ZIP of deployed files
Step 2 β Modify Files Locally
Extract the ZIP and make the changes you need. For compiled runtimes (.NET), remember this will be a compiled build output rather than the original source project.
Step 3 β Create the Target Web App
- Azure Portal β Create a resource β Web App
- Choose the same runtime as the original site
- Reconfigure app settings, connection strings, managed identities and TLS certs as needed
Step 4 β Deploy the Modified Files (Zip Deploy)
Zip Deploy uploads and extracts a ZIP directly to the Web App.
Option A β Kudu UI
- Open Kudu for the target Web App
- Go to Tools β Zip Push Deploy
- Upload your ZIP
Option B β Command Line (curl)
curl -X POST -u "<deploy-user>:<deploy-password>" -T "myapp.zip" "https://<app-name>.scm.azurewebsites.net/api/publish?type=zip"
Get credentials from your publish profile or use a deployment user.
Donβt Forget to Copy Configuration
The wwwroot ZIP includes runtime files only β configuration and other settings must be copied separately.
- App Settings & Connection Strings: Azure Portal β Web App β Configuration
- Managed Identity: Re-enable the identity and reassign permissions
- TLS Certificates & Custom Domains: Re-bind certificates and domains
- External Storage/Databases: Update connection strings if needed
Summary
If available, Clone App is the fastest approach. For the most control, use Kudu β Download β Modify β Zip Deploy. Both methods are valid depending on your scenario and app configuration.
Further Reading
Have questions about cloning an Azure Web App? Drop a comment below!