How To Install Drupal On Ubuntu 14.04

Version 1.0
Author: Srijan Kishore

This document describes how to install and configure Drupal on Ubuntu 14.04. Drupal is an open source content management platform powering millions of websites and applications. It’s built, used, and supported by an active and diverse community of people around the world.

1 Preliminary Note

This tutorial is based on Ubuntu 14.04 server, so you should set up a basic Ubuntu 14.04 server installation before you continue with this tutorial. The system should have a static IP address. I use as my IP address in this tutorial and as the hostname.  You must have a LAMP server installed in Ubuntu 14.04 as mentioned in the tutorial to continue further.

2 Database initialization

I will create  the database for the Drupal as follows:

mysql -u root -p

Here we are adding database=drupaldb user=drupaluser and password=drupalpassword:


And a new MySQL user to access the Drupal database

CREATE USER [email protected] IDENTIFIED BY 'drupalpassword';

GRANT ALL PRIVILEGES ON drupaldb.* TO [email protected];

Reload the MySQL database priveliges to activate the new MySQL user:



3 Installation of Drupal

We will first make a directory temp in which I will the download the latest version of the Drupal as follows:

cd /temp

We need to install unzip as by default it is now installed:

apt-get install unzip

Further moving ahead, please note that Drupal would always be dependent on a specific PHP module. Hence, if it is not yet installed on your server, you must immediately download php-gd using the following command:

apt-get update
apt-get install php5-gd

unzip the Drupal zip file in the following created folder:

unzip -q -d /var/www/html/

It will create a folder as /var/www/html/drupal-7.30, I will rename the folder as /var/www/html/drupal. Here I am removing the version name only:

mv /var/www/html/drupal-7.30/ /var/www/html/drupal

Now give appropriate permissions in the directory

chown -R www-data.www-data /var/www/html/drupal
chmod -R 755 /var/www/html/drupal

Now proceed to the web installation of Drupal. Go to the URL
Proceed with Standard and hit Save and continue.


Now by default English is selected, continue with Save and Continue:


Now we will proceed towards the login page by giving the  database information as selected at the time of the Drupal database creation:

In my case it was

Select MySQL, MariaDB, or equivalent
Database name = drupaldb
Database username = drupaluser
Database password = howtoforge
Datbase host = localhost


Give the information as per your choice, here I am using like:

Site name = Drupal site
Site e-mail address = [email protected]
Username = admin
Email-address = [email protected]
Password = howtoforge
Country = India
Default time-zone = Asia/kolkata +0530

The above values are user's specific, you can customize it according to your choice. Further press Save and Continue:


This will be your install Drupal.

Now proceed towards the Visit your new site.

Congratulations! You now have a fully functional Drupal instance on your Ubuntu 14.04 :)

Share this page:

Suggested articles

5 Comment(s)

Add comment


By: PHarstvedt

Getting 500 error from server when pressing "save and Continue" from site settings page

By: PHarstvedt

Error from apache2 error.log: 

[Sun Jan 24 12:10:18.883614 2016] [:error] [pid 24097] [client] PHP Fatal error:  Call to undefined function field_attach_load() in /var/www/html/drupal/includes/ on line 316, referer: http://linuxtest/drupal/install.php?profile=standard&locale=en


By: till

Thats Drupal error mostly related to your PHP setup and settings, so its a problem in the base lamp setup of your server and not this install guide. See here:

Check your php.ini and try to disable opcahche, when it is enabled.


By: PHarstvedt

Thanks for the link. I made a number of changes suggested on the link you shared. The install completed ... not really sure which change made the difference.


By: sdsad

Getting 500 error from server when pressing "save and Continue" from site settings page like the other user stated too :/