How to Deploy my php application on Windows Webapp

Jason Zwanepoel 66 Reputation points

Hi all hope you can assist

I have an Azure pipeline to build and zip my code and then add push artifact

When I do this I noticed that my Code files gets added to a folder called 's'

Below you will find what I have attempted to set up and attatched you will see my Deployment

Please Assist me I need to make the code go under my wwwroot folder and not wwwroot\s

My azure-pipelines.yml


  • master

vmImage: 'ubuntu-latest'

phpVersion: 7.2


  • script: |
    sudo update-alternatives --set php /usr/bin/php$(phpVersion)
    sudo update-alternatives --set phar /usr/bin/phar$(phpVersion)
    sudo update-alternatives --set phpdbg /usr/bin/phpdbg$(phpVersion)
    sudo update-alternatives --set php-cgi /usr/bin/php-cgi$(phpVersion)
    sudo update-alternatives --set phar.phar /usr/bin/phar.phar$(phpVersion)
    php -version
    displayName: 'Use PHP version $(phpVersion)'
  • script: composer install --no-interaction --prefer-dist
    displayName: 'composer install'
  • task: ArchiveFiles@2
    rootFolderOrFile: '$(System.DefaultWorkingDirectory)'
    includeRootFolder: true
    archiveType: 'zip'
    archiveFile: '$(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip'
    replaceExistingArchive: true
  • task: PublishBuildArtifacts@1
    PathtoPublish: '$(Build.ArtifactStagingDirectory)'
    ArtifactName: 'drop'
    publishLocation: 'Container'

Kind Regards


Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
4,947 questions
0 comments No comments
{count} votes

Accepted answer
  1. Mark Allan 416 Reputation points MVP

    In the ArchiveFiles task, change includeRootFolder: true to includeRootFolder: false so it adds the files in the s folder to the ZIP but not the folder itself.

    2 people found this answer helpful.

0 additional answers

Sort by: Most helpful