How to Install Composer for Drupal

header image for Installing Composer for Drupal

There are multiple ways to install Composer to use with your Drupal site.  Composer can be used with Linux/Unix/macOS/Windows.  Remember that Composer is primarily a tool to help keep your Drupal site dependencies updated. 

Composer can be installed globally (to the entire server), or specifically to a Drupal directory.  We will typically recommend that the application be installed where it will be used.  This is to limit it so that it is only used where your site is installed.

The developers of the application have provided an installer that you can download. Use the installer to ensure that the application is appropriately installed.

Looking for a new server for your Drupal site?  Check out InMotion’s Managed VPS solutions for a hosting server that can scale to meet your performance or budget needs.


In order to run Composer, you will need PHP 5.3.2+.  Composer will also run on Windows, Linux, or MacOS.


The installation will be described from the perspective of a terminal from a Linux-based server. If you are an InMotion Hosting subscriber, then your hosting server will meet the system requirements and cPanel provides terminal access to your account.

  1. Log in to cPanel.
  2. Open the cPanel File manager, then navigate to where you will install the Drupal site.  
  3. Copy the Installer file into your folder location.
  4. Optionally, you can also bypass the Installer and simply upload the composer.phar file.  You can find the download links at the bottom of the page.  Installer will check for requirements and provide warnings for issues that you may need to correct in order for Composer to properly work.  However, it’s been my experience that Composer will operate within the InMotion Hosting account.  If you find yourself needing to edit the php.ini file, check out How to Use the MultiPHP INI Editor
  5. Once the installer file has completed, it will upload the composer.phar file into your folder.

This completes the installation of the Composer to use with your Drupal installation. You can check to see if it’s working by simply running a brief command.

  1. Launch your cPanel Terminal.
  2. Navigate to the Drupal installation folder where you have installed Composer.
  3. Use the following command:
composer about 

You will then see a brief description of Composer:

brief description of Composer

This completes our article on installing Composer for Drupal.  To learn more about Drupal, check out the Drupal Educational Channel on our Support Center website.

Learn how to manage critical server administration functions, cPanel and WebHost Manager (WHM) with our Managed VPS Hosting Product Guide.

Arnel Custodio Content Writer I

As a writer for InMotion Hosting, Arnel has always aimed to share helpful information and provide knowledge that will help solve problems and aid in achieving goals. He's also been active with WordPress local community groups and events since 2004.

More Articles by Arnel

Was this article helpful? Let us know!