Skip to main content

Installing Drupal 9 for a new web project with Composer

So I guess with Covid I didn't realize Drupal 9 was released. I have been working with Drupal since the early 2000s, and although it is no longer part of my day job I still like to keep up on it.

Now before I get started I want you to know I am not starting from scratch.

I have an Ubuntu box running php - fpm.

I have already installed composer on this server.

If you don't know if composer is installed for you you can quickly check with this command:

$ which composer

I already have the project virtual host set up in Apache.

I will be working out of the openlysober.com directory

 

Navigate to the parent directory of the openlysober.com directory and run:

$ composer create-project drupal/recommended-project openlysober.com

This will create files and directories. within openlysober.com

:~/openlysober.com$ ls
composer.json  composer.lock  vendor  web

Pay attention to the directory named web. This is where you drupal core files will be. I have already configured my Apache virtual host to server any http documents out of the web directory.