How to install Drupal 8.4.5 on Ubuntu 18.04

Drupal is a free and open source content management system. It is getting popular and used by many people and organizations around the world due to its efficiency and scalability.

This framework is written in PHP. It helps the people or organization to create and deliver customized and digital content for web and mobiles. The content includes many types like text, media, customized forms and many more. It has powerful editing tools to maintain the content in no time.

In this guide, we will learn how to install Drupal version 8.4.5 on Ubuntu 18.04. I will provide the installation process step by step.

Prerequisites

  • Curl
  • Tasksel
  • Ubuntu LAMP
  • Drupal PHP module php-fdomdocument

Step 1: Commands to set up the pre-requisites

To install Curl and Tasktel, use the following linux command.

$ sudo apt install -y curl tasksel

After the above, we need to install Ubuntu LAMP stack (Linux, Apache, MySQL, PHP). It will use tasksel to do so. We will also enable rewrite code. The following commands will perform these steps.

$ sudo tasksel install lamp-server
$ sudo a2enmod rewrite

Now we have to install PHP module. The following command is required.

$ sudo apt install php-fdomdocument php-gd

There is a configuration which will be required for Drupal installation. It is to enable “Clean URLs”. For this, we have to edit Apache’s default site configuration file. The following command serves the purpose.

$ sudo nano /etc/apache2/sites-enabled/000-default.conf

Next we need to add the following code below DocumentRoot/var/www/html line:

<Directory /var/www/html/>

Options Indexes FollowSymLinks

AllowOverride All

</Directory>

Now we need to restart the Apache server to apply the changes, the following command will serve the purpose. After this step, we will be able to download and install Drupal.

$ sudo systemctl restart apache2

Step 2: Download Drupal package

In this step, we will download the package using Curl command as follows.

$ curl --output/tmp/drupal.tar.gz 
https://ftp.drupal.org/files/projects/drupal-8.4.5.tar.gz

Now download the Drupal files into Webserver’s root directory. Change the file ownership to www-data. The following are commands to serve the purpose.

$ sudo rm -fr /var/www/html
$ sudo tar xf /tmp/drupal.tar.gz -C /var/www/
$ sudo mv /var/www/drupal-8.4.5/ /var/www/html
$ sudo chown -R www-data:www-data /var/www/html

Step 3: Configure Database

The following commands will create a database “Drupal” and create credentials for it.

$ sudo mysqladmin create drupal
$ sudo mysql -e "CREATE USER 'admin'@'%' IDENTIFIED BY 'pass';"
$ sudo mysql -e "GRANT ALL PRIVILEGES ON drupal.* TO 'admin'@'%' WITH GRANT OPTION;"

Step 4: Installing Drupal

Open the browser and enter the URL http://drupal-ubuntu. An installation wizard will be opened.

How to install Drupal 8.4.5 on Ubuntu 18.04

After choosing a language, we click on save and continue. After that choose profile will be visible. There we can choose installation with standard or minimal. Choose which option suits us.

How to install Drupal 8.4.5 on Ubuntu 18.04

After that, we will verify the requirements and then give database credentials as we added in step 3.

How to install Drupal 8.4.5 on Ubuntu 18.04

How to install Drupal 8.4.5 on Ubuntu 18.04

Drupal will be installed after filling all the details. After the installation, we will configure our website with site maintenance account.

How to install Drupal 8.4.5 on Ubuntu 18.04

How to install Drupal 8.4.5 on Ubuntu 18.04

Conclusion

To install Drupal 8.4.5, we need to set up its prerequisites first. Then we will configure the database. The installation is simple as it will be a wizard, after filling the appropriate details in the wizard, we will be able to use this software for our digital sites.

Check out these top 3 Drupal hosting services:

HostArmada
$1.79 /mo
Starting price
Visit HostArmada
Rating based on expert review
  • User Friendly
    4.5
  • Support
    4.5
  • Features
    4.5
  • Reliability
    4.5
  • Pricing
    4.0
IONOS
$1.00 /mo
Starting price
Visit IONOS
Rating based on expert review
  • User Friendly
    4.5
  • Support
    4.0
  • Features
    4.5
  • Reliability
    4.5
  • Pricing
    4.3
Ultahost
$2.90 /mo
Starting price
Visit Ultahost
Rating based on expert review
  • User Friendly
    4.3
  • Support
    4.8
  • Features
    4.5
  • Reliability
    4.0
  • Pricing
    4.8
  • Click this link and all your queries to best hosting will end.

How to Create a Non-root User on Your Ubuntu 18.04 VPS or Dedicated Server

This guide shows you how to create a user on your Ubuntu 18.04 virtual server.
3 min read
Michael Levanduski
Michael Levanduski
Expert Hosting Writer & Tester

How to Install a Self-Signed SSL Certificate on Your Ubuntu 18.04 VPS or Dedicated Server

This how-to article will teach you how to create a self-signed SSL certificate o
3 min read
Michael Levanduski
Michael Levanduski
Expert Hosting Writer & Tester

How to Set Up Cron Jobs on Your Ubuntu 18.04 Dedicated Server or VPS

This guide shows webmasters and administrators how to set up cron jobs on your U
3 min read
Idan Cohen
Idan Cohen
Marketing Expert

How to Install WordPress on Your Ubuntu 22.04 VPS or Dedicated Server

This tutorial will show you how to install WordPress on your Ubuntu 22.04 virtua
3 min read
Idan Cohen
Idan Cohen
Marketing Expert
HostAdvice.com provides professional web hosting reviews fully independent of any other entity. Our reviews are unbiased, honest, and apply the same evaluation standards to all those reviewed. While monetary compensation is received from a few of the companies listed on this site, compensation of services and products have no influence on the direction or conclusions of our reviews. Nor does the compensation influence our rankings for certain host companies. This compensation covers account purchasing costs, testing costs and royalties paid to reviewers.
Click to go to the top of the page
Go To Top