Install Drupal 8 via composer

0
(0)

First you need to install the composer package (preferably globally in the system) following the instructions

Next, preparing database (in my case MySQL)

# mysql -u root -p password
# create database drupal;
# use drupal;
# grant all privileges on drupal.* to drupaluser@localhost identified by 'password';
# flush privileges;
# exit

Next, go to the root folder of your web server (usually /var/www/html), but in our case we will go to the folder a level lower (/var/www), since we will use composer

# cd /var/www

Now typing:

$ composer create-project drupal-composer/drupal-project:8.x-dev html --stability dev --no-interaction

As a result, your Drupal project will be installed in the html folder, for security reasons, the entire web part is moved to the html / web subdirectory. In order for the project to work, you need to slightly change the configuration of your web server (apache / nginh) so that the root of the site points to the folder / var /www/ html/web and at the same time from the folder / var / www / html / you can manage the drupal project from the command line (installing modules, dependencies)

Similar Posts:

963

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

Scroll to Top