Thanks for reaching here! It seems like you are facing an issue with file deletion during deployment of your PHP application on Azure App Service (Linux).
When you deploy your application using the Deployment Center (CI/CD), it clones your repository into the /repository folder and then copies the contents of this folder into the /wwwroot folder. However, it seems that the files deleted in the repository are not being removed from the /wwwroot folder during deployment.
To resolve this issue, you can try the following steps:
- The Azure App Service Deploy task has a
RemoveAdditionalFilesFlag
setting. Set that to true to remove the files that's on the destination. - If you're using Kudu as your source repository for deployments, I didn't find any remove additional file settings in https://github.com/projectkudu/kudu/wiki. Kudu will simply use the files in the repo folder, usually https://yourwebapp.scm.azurewebsites.net/api/vfs/site/repository/ assuming
SCM_REPOSITORY_PATH
hasn't been modified. usegit rm
to get remove them. Same applies if your Kudu is using an external repository.
Let us know.