Installing Composer on Azure App Service

Ross Summerell 1 Reputation point

Hi guys, new to Azure and testing it out to see if its worth using, I started here

Which worked great, I then tried to upload my own Laravel App to test, however my APP needs Composer to install dependencies.

I found many articles but the two below sum up what I did or

However, even though the Extension is successfully installing (Composer), when going Advance Tools - > CMD and typing Composer I get this

'composer' is not recognized as an internal or external command,
operable program or batch file.

I've then been talking to the support which has been very helpful who linked this article below but sadly that has not got it working either

Can anyone help?

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

3 answers

Sort by: Most helpful
  1. Joffrey NURIT 211 Reputation points MVP

    Hi Ross,

    The first question are: what is the OS of your app service?

    The topic you found in has a good solution.
    You need to connect to your app service, in SSH if its Linux or in PowerShell if windows (use KUDU, it's more simple).
    Composer is a binary who works with PHP. Your app service need to be configure for PHP.
    After that, you can:

    • download forLinux the installer php file, for windows the composer.bat (you can download it on the machine OR copy the file with FTP)
    • Execute the file (php installer on Linux / composer.bat on windows)

    The process was described here:

    Hope it helps!

    0 comments No comments

  2. Emerson Caro 86 Reputation points


    To install Composer, go to your App Service > Extensions > Add and choose Composer.

    After installing, you can see it on the SiteExtensions folder under the root folder of the machine where your application is hosted.

    0 comments No comments

  3. Ross Summerell 1 Reputation point

    Thanks both of you for the feedback,

    Again I am new to Azure, I am running PHP 7.3 stack.

    I am guessing Windows is the OS? I have not picked any OS' during the set up following this,

    But I have been using PowerShell.

    As a somewhat work around, I moved the composer.bat and .phar files from the siteExtenstions/ComposerExtentions/Commands to my site/wwwroot and then was able to run composer in cmd

    So it seems the problem is that it wont install composer globally?

    0 comments No comments