Share via

Web App Azure CLI command does not work

Tyler Suard 55 Reputation points
2025-11-05T01:16:41.39+00:00

I use this command:

az webapp deploy --resource-group <my resource group> --name <my function name> --src-path dist.zip --type zip

However, my code never gets deployed to the app, even though the command line says the deployment was successful. The wwwroot folder still has the original files that came with the web app. I have to manually upload my zip to that folder to get it to work.

Azure App Service
Azure App Service

Azure App Service is a service used to create and deploy scalable, mission-critical web apps.

0 comments No comments

2 answers

Sort by: Most helpful
  1. Shree Hima Bindu Maganti 7,580 Reputation points Microsoft External Staff Moderator
    2025-11-14T04:10:44.5333333+00:00

    Hi @Tyler Suard
    It seems you're experiencing issues deploying your code to your Azure Web App with the Azure CLI. Even though the CLI reports a successful deployment, the changes aren't appearing in your app.

    Enable logging by adding --logs to your command to spot any errors.

    Ensure the resource group and app name are correct. You can also use az webapp up to streamline deployment from your local workspace.

    az webapp up --resource-group <my resource group> --name <my function name> --src-path dist.zip --sku F1
    Confirm you're using the latest version with az --version, and update if needed.

    Add --debug or --verbose for more detailed logs during deployment.

    Make sure your app isn't linked to a different source or storage than your current zip file.

    Verify that your app is set up for the deployment method you're using.

    https://learn.microsoft.com/en-us/cli/azure/use-azure-cli-successfully-tips?view=azure-cli-latest&tabs=bash%2Ccmd2#debugging-azure-cli-commands
    https://learn.microsoft.com/en-us/azure/app-service/quickstart-dotnetcore?tabs=net80&pivots=development-environment-cli
    let me know if you have any further assistances needed.

    Was this answer helpful?

    0 comments No comments

  2. Luis Arias 9,536 Reputation points Volunteer Moderator
    2025-11-05T10:30:13.29+00:00

    Hello Tyler,

    Welcome to Microsoft Q&A, Even though the CLI reports success, the issue likely comes from how Azure App Service handles zip deployments. The az webapp deploy command uses Kudu under the hood, and for zip deployments to work properly, the app must be configured to accept zip pushes. If you're deploying to an Azure Function, zip deployment only works when the function app is set to run from a package file. Otherwise, the zip content won’t overwrite the existing wwwroot folder.

    To make it work:

    Ensure WEBSITE_RUN_FROM_PACKAGE=1 is set in your app settings.

    Use az functionapp deployment source config-zip for Azure Functions instead of az webapp deploy.

    Reference:

    If this resolves your question, please accept the answer.

    Luis

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.