Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
Please note: If you started your project using Drupal version 8.8.0 or later, your site already uses the correct file structure and is ready to be converted to Composer.
This page is a step by step guide to manually adding Composer support to an existing site that was previously installed without Composer. This howto is for you if you installed a Drupal site manually from a tarball or have used an abandoned Composer template like drupal/drupal.
Troubleshooting Composer can be frustrating. Composer is doing many complex things for you, and there's a degree of understanding required to effectively troubleshoot issues that arise.
This page is intended to provide troubleshooting techniques and to enumerate common problems. It is not intended to be exhaustive. If you're having a problem not described here, performing an internet search for your specific error message may be more helpful.
You can use Composer to manage dependencies for your custom modules. To do this, your Drupal site's composer.json (located in the repo root) must have a way to read your custom project's composer.json file. If your custom project is not hosted on Packagist or Drupal.org, you may use a Composer path repository to accomplish this.
Find the repositories section of your root composer.json file, and modify it to include your custom module or modules as path repositories: