Install dependencies with Composer

Last updated on
9 June 2023

This step is needed only if you have installed (or updated) the codebase using git.

If you do not have composer installed, see the official composer installation instructions.

In order to get a working codebase, you need to run composer install --no-dev from the top level of the repository. This will install Symfony and other packages required by Drupal in the vendor/ directory.

If you skip this step, then you are likely to see an error message like this when you try to run the installer:

Warning: require(.../drupal/vendor/autoload.php): failed to open stream: No such file or directory in .../drupal/autoload.php on line 14

It is important to include the --no-dev option when installing packages for your production server. Some packages, such as phpunit/*, are inherently insecure and should never be installed on the production server. If you are installing Drupal on a local or development server, and you want to install development packages, then leave off the --no-dev option.

You may also add the -o option, to generate optimized autoload files. For a complete list of options for the composer install subcommand, use composer help install.

Help improve this page

Page status: No known problems

You can: