Home » How to Install Drupal in Ubuntu

How to Install Drupal in Ubuntu

by Online Tutorials Library

How to Install Drupal in Ubuntu?


Drupal is an open source CMS (Content Management System) and framework. It is written in PHP and can work on cross-platform.

It is widely used to design web-sites and provides back-end framework for at least 2.3% of all web-sites worldwide.

Here, we will install drupal in Ubuntu operating system. This whole process includes the following steps.

Before installing drupal, make sure our operating system meet the following prerequisites.


  • Ubuntu 16.04
  • LAMP (Linux Apache MySQL PHP)
  • Login as root user, to the terminal

1) Download Drupal

Before downloading, change current working directory to the /var/www/html. The following command will download a zip folder of drupal from the official site.

Software Drupal 1

2) Extract the Folder

Use the following command to extract the downloaded folder.

3) Create Database

Use the following command to create database into the MySQL.

4) Run on Localhost

let’s access the drupal project at localhost on the browser. And follow the installation instructions.

Select Language

Software Drupal 2

Select installation profile

Software Drupal 3

Create a Copy

Create a copy of defult.settings.php file as settings.php located inside the default directory. We have used the following command to create a copy.

Software Drupal 4

Configure Apache Web Server

It will open server config file, locate the following code segment and change AllowOverride None to AllowOverride All.

After that, change rewrite mode by using the following command.

And restart the Apache web server by using the following command.

Set Permission

Use the following command to set permission for the drupal parent folder.

After doing all these things now come back to the browser and configure database.

Configure Database

Provide database details.

Software Drupal 5

Save and continue

Software Drupal 6

It starts installing drupal to the local system.

After successfully installation, provide site information and login credentials and save.

Software Drupal 7

After saving, drupal shows home page to the browser. This looks like the following.

Software Drupal 8

It means, we have successfully installed drupal into the Ubuntu operating system.

You may also like