Submitted by hussien on Sat, 01/01/2022 - 06:02

These days, the recommended method of installing Drupal in Ethiopia is via Composer. Drupal core, as well as contributed modules and themes, can be installed using this tool. Our simple yet comprehensive installation guide for Drupal Composer can be found here. The Composer commands you will use to manage your Drupal project using a combination of downloading (requiring) modules and themes that you want to install and checking for new versions of those modules and themes as they are released.

Here is the step-by-step guide on how to perform Common Composer tasks for Drupal 8 and 9 if you are living in Addis Ababa

What do you need to do to install Drupal?

It is important to prepare accurate conditions for installing Drupal before building your Addis Ababa website. There are two basic requirements for the process - a web server and a database server. AMP is an acronym for: The most popular operating systems call AMP, which is also an acronym for:

  • A web server such as Apache (or another web server such as Nginx),
  • A database server such as MySQL (or MariaDB) is needed.
  • Drupal releases support PHP (in a particular version).

You must meet the requirements of the particular Drupal version to install its core.

How Can Composer Help You Install Drupal 8 or 9?

It manages PHP dependencies with the help of Composer. What makes it a convenient way to install Drupal 8 or 9? First, it makes Drupal modules, libraries, themes, etc., easy and transparent to manage. Furthermore, this will ensure that every module or theme has just been updated. 

Additionally, Drupal installation with Composer is made easier through the official project. You can find everything you need to know there. Composer is highly recommended for Drupal installation, based on these and other reasons - we could go into more detail, but that isn't the point here. 

Composer's main advantage is that it provides a way to systematically manage large lists of dependencies (and their subsidiary dependencies) and ensure that the right versions for each package are used when they are updated.

It is now possible to install Drupal using Composer with an official project composer template. It is also included in the web hosting in Ethiopia. We will use this template directly to create our project.

A step-by-step guide to installing Drupal with Composer

Before Composer, Drupal was commonly installed through Drush or Drupal Console. Now, Composer takes care of downloading Drupal itself. The following steps show you how to use Composer to install Drupal.

  1. Download and install Composer

First and foremost, you need to install Composer on your local machine. Details about how to do this on different operating systems, such as Linux, macOS, or Windows, can be found there.

  1. Using Composer, download Drupal Core

The drupal/recommended-project composer template should download Drupal 9 or 8 core. Consequently, you will always have the same core dependencies as the official release. The drupal/recommended project template changed since Drupal 8.8.0 from the drupal-composer/drupal-project.

The following commands should be used to install Drupal 8 or 9 core:

Composer create-project drupal/recommended-project my_site_name_dir

Downloading the drupal/recommended-project package directly into my_site_name_dir will be accomplished with this command. When the composer command is activated, it will automatically download Drupal core and its dependencies in the latest stable versions.

You'll find all files that can't be served by the web server and those that should be stored outside the webroot in the my_site_name_dir directory.

  1. Using Composer, download the specific Drupal Core version.

With the command above, you will download the latest Drupal version, e.g., Drupal 9.2.0. You will need a different command if you want to download another one, such as Drupal 8.9.1:

Composer create-project drupal/recommended-project:8.9.1 my_site_name_dir

  1. Using Composer, download contributions modules and themes

Drupal core has already been installed. Now it's time to add modules and themes to expand its capabilities. Composer is all you need for that. The following command should be run at the root of your Drupal site to download the contributed module or theme with its dependencies:

composer require drupal/<modulename>

Let's presume it will be a Pathauto module. The command would look as follows:

composer require drupal/pathauto

As soon as Pathauto is added to the requirements, Composer will update the Composer. Son.

  1. Get a Special Version of Contributed Modules or Themes

You can identify which module or theme you wish to install similarly to Drupal core. To do so, run the following command:

Composer require 'drupal/<modulename> :< version>'

An example would be:

Composer requires 'drupal/pathauto: ^1.8.'

  1. Changing the location of packages

A location can be specified where the packages should be installed after they have been downloaded. You need to change "installer-paths" in composer. Son to accomplish this. Set it up as follows:

"Extra": {

    "installer-paths": {

        "Core": ["type: drupal-core"],

        "libraries/{$name}": ["type:drupal-library"],

        "modules/contrib/{$name}": ["type:drupal-module"],

        "profiles/contrib/{$name}": ["type:drupal-profile"],

        "themes/contrib/{$name}": ["type:drupal-theme"],

        "drush/{$name}": ["type:drupal-drush"],

        "modules/custom/{$name}": ["type:drupal-custom-module"],

        "themes/custom/{$name}": ["type:drupal-custom-theme"]

Is it possible to install Drupal 8 or 9 without Composer?

Composer is a recommended method of installing Drupal, as previously mentioned. If for whatever reason, you cannot or do not wish to use Composer, there are other solutions. For example, Drupal can be installed from the command line with Drush.

Briefly, you need to include the following command in your project:

composer require drush/drush

After that, run drush site: install.

Using Composer to manage Drupal sites

Installing Drupal 8 and 9 with Composer is not the only purpose of the tool. It can be used for updating the Drupal core and modules, themes, and libraries. Here are a few resources you can check to learn more about this area.

  • Using Composer to update Drupal Core
  • Using Composer to update modules and themes

Installation of Drupal 8 and 9 with Composer - Summary

Installing Drupal 8 or 9 is much faster and easier with Composer. This tool will allow you to manage your site and its dependencies in the future, so you no longer have to download the CMS core manually. 

A solution like this ensures that site owners have a sense of security and comfort. The installation of Drupal 8 or 9 could be difficult for people, so you should consult professional Webhosting in Ethiopia or surroundings.