Adding BLT to an existing project can be much more complex than simply creating a new site with BLT. There are a few reasons for this:
- BLT expects your project to have a particular directory structure and set of files.
- Your existing dependencies may conflict with BLT's dependencies.
Prerequisites:
- The Drupal root must be in a top-level
docroot
directory. - You must already use Composer to manage site dependencies. If you don't, please see Using Composer to manage Drupal site dependencies and modify your project accordingly.
- Ensure that your dependencies are all up to date via
composer update
. Assert that these updates do not break your project.
To add BLT to a pre-existing Drupal project, do the following:
-
cd
into your existing project directory. -
Set Composer's
minimum-stability
todev
andprefer-stable
totrue
:composer config minimum-stability dev composer config prefer-stable true
-
Add BLT via composer:
rm -rf vendor composer.lock composer require acquia/blt:^9.0.0 --no-update composer update
-
Continue following instructions after the
composer create-project
command in Creating a new project with BLT.