Managing Existing Sites Using Composer

Managing Existing Sites using Composer

There are times when you may find yourself wanting to use Composer in order to manage the dependencies on a particular Drupal installation. If Composer was not installed during the installation of the Drupal site, then you will either need to manually make a change, or you can use a plugin to get Composer properly configured.

This article applies to Drupal 8 sites that were originally installed without using Composer.

Using the Composerize Plugin

The easiest way to get Composer properly configured to use with your Drupal site is to use the Composerize plugin. You can download it and then get installed on your site. To learn more about the plugin, please see the plugin documentation from their github location.

Once you have the plugin installed it will automatically generate an updated composer.json file. The Composerize plugin will add contributed modules, themes, and profiles that it finds on your site.

The Composerize plugin will create a composer.json file from your installed Drupal codebase.

Manually Editing the Composer.json File

Manually editing your Composer.json file to add the Composer can be a very lengthy endeavor. has graciously put in a step-by-step document for Adding Composer to an Existing Site. These steps will take you through the manual exercises required to get your site working with Composer.

Make sure your business, agency, or reseller clients are always connected and powered on with our optimized Managed VPS Hosting.

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!