This website uses cookies

Our website, platform and/or any sub domains use cookies to understand how you use our services, and to improve both your experience and our marketing relevance.

Install A Drupal Bootstrap Theme Using Composer

November 15, 2017

2 Min Read

In a previous tutorial, I have already covered the process of creating a Drupal 8 Bootstrap theme. While installing a theme through the Admin UI is pretty simple, installing it via Composer requires a bit of work. In this guide, I will show you how to install a Drupal Bootstrap Theme using Composer.


First Things First!

Before getting started, one important thing to understand is that not every Drupal package is available via composer.JSON right out of the box. Hence if you try to install the theme via the command composer require drupal/bootstrap or composer require twbs/bootstrap before making appropriate changes to the composer.JSON file, the theme won’t appear in the Admin UI.

Add Appropriate Repositories

So what you need to do now is to add the appropriate Drupal repositories to the composer.JSON file. You need to look for a package name for Bootstrap for Drupal, here. After finding out the package name, simply edit the composer.JSON file using your text editor. Add the following lines before the line starting with “extra”:

"repositories": { "drupal": { "type": "composer", "url": "" } }

Make Appropriate Changes via Composer

Now, if you previously tried adding the theme via the composer require twbs/bootstrap command, you must first remove it first. You can do this by executing the following command:

composer remove twbs/bootstrap

Now, run the following command to install the theme successfully on your Drupal site:

composer require drupal/bootstrap


That’s it! You’ve successfully installed the Drupal Bootstrap Theme using Composer. The only problem that might pop up is that Composer doesn’t include the required repositories by default. Hopefully, these will be added in the future releases. Until then, you can follow this guide in order to install any module or theme that has a repository for Composer.

Share your opinion in the comment section. COMMENT NOW

Share This Article

Create interactive Drupal websites easily on the Cloud.

Host your website on optimized Drupal hosting servers.

Hamza Zia

Hamza is a Drupal Community Manager at Cloudways - A Managed Drupal Hosting Platform. He loves to write about Drupal and related topics. During his free time, he can be seen obsessing over Football, Cars, Android and Gaming.


Get Our Newsletter
Be the first to get the latest updates and tutorials.

Thankyou for Subscribing Us!


Webinar: How to Get 100% Scores on Core Web Vitals

Join Joe Williams & Aleksandar Savkovic on 29th of March, 2021.

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!