Atlantic.Net Blog

How To Install Drupal on an Ubuntu 14.04 Server with Apache

Jose Velazquez
by Atlantic.Net (71posts) under VPS Hosting
Verified and Tested 02/27/15


In this How-To, we will walk you through the install and configuration of Drupal with Apache. Drupal is a free content management system that will facilitate the way your content is organized and managed. It has a user-friendly interface that makes customizing your content easy and simple with little effort.


A cloud server with Ubuntu 14.04 and Apache already installed.

You will also need to have a Server with LAMP(Linux, Apache, MySQL, PHP) configured. See our “How To Install LAMP on Ubuntu 14.04“.

Installing Drupal on Ubuntu Server with Apache

Log into your MySQL:

mysql -u root -p

Create the database for your Drupal installation. (I will use “mydrupal” as the database name)


Create your Drupal user and password for the database. (I will use mydrupaluser as my user and strong password as a password)

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

Grant the following permissions to the Drupal user


Refresh the privileges information:


Exit MySQL:


Update your local package and install them by typing:

sudo apt-get update
sudo apt-get install php5-gd php5-curl libssh2-php

Type the following command to Open the Apache PHP configuration file to make some changes.

sudo nano /etc/php5/apache2/php.ini

Change the expose_php line and the allow_ur l_fopen line to “Off”:

Set expose_php in php.ini to off

php.ini expose_php

Set allow_url_fopen to off

php.ini allow_url_fopen

Save and close the file when you are finished.
Enable the rewrite functionality so URLS are edited by Drupal when needed:

sudo a2enmod rewrite

Update your VirtualHost configuration to use an .htaccess file:

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

In the “VirtualHost” block, add a directory block that points to your web root/ Set the AllowOverride to “All”/ Add a ServerName and have it point to your domain name/ update the ServerAdmin to a valid email address as follows:

<VirtualHost *:80>
. . .
ServerAdmin [email protected]
DocumentRoot /var/www/mydrupal

<Directory /var/www/mydrupal>
AllowOverride All
. . .

when you’re done, Save and close the file.

Restart Apache:

sudo service apache2 restart

Download and Install the Drupal by going to Right click on the tar.gz link of the latest recommended version or the one that you prefer and “copy link address”


Extract the application:

tar xzvf drupal*

Use the rsync utility to safely copy all of the files into the web root directory of your server:

cd drupal*
sudo rsync -avz . /var/www/mydrupal

Note if you get an error message “sudo: rsync: command not found” simply install rsync with the following command then run the above:

apt-get install rsync

Change directory into the web root to customize our installation:

cd /var/www/mydrupal

To simplify our installation make a new directory under the sub-tree sites/default called files:

mkdir /var/www/mydrupal/sites/default/files

Grant permissions to this file:

chmod 664 /var/www/mydrupal/sites/default/files

Copy the default settings file to the filename that Drupal uses for its active configuration:

cp /var/www/mydrupal/sites/default/default.settings.php /var/www/mydrupal/sites/default/settings.php

Allow write permissions to the PHP group owner:

chmod 664 /var/www/mydrupal/sites/default/settings.php

Grant the entire Drupal installation the following ownership properties:

sudo chown -R :www-data /var/www/mydrupal/*

Your server is now configured correctly to run the web-based installation:


You will see the Drupal installation procedure’s initial page. You will then finish the install by inputting the requested information.

How To Install Drupal on an Ubuntu 14.04 Server with Apache-3

Congratulations! You have just installed and configured Drupal with Apache on your Ubuntu 14.4 Virtual Private Server. Thank you for following along in this How-To and check back with us for any new updates.

Get A Free To Use Cloud VPS

Free Tier Includes:
G2.1GB Cloud VPS Free to Use for One Year
50 GB of Block Storage Free to Use for One Year
50 GB of Snapshots Free to Use for One Year

Looking for a Hosting Solution?

We Provide Cloud, Dedicated, & Colocation.

  • Seven Global Data Center Locations.
  • Flexible Private, Public, & Hybrid Hosting.
  • 24x7x365 Security, Support, & Monitoring.
Contact Us Now! Med Tech Award FTC
SOC Audit HIPAA Audit HITECH Audit

Recent Posts

Get started with 12 months of free cloud VPS hosting

Free Tier includes:
G2.1GB Cloud VPS Server Free to Use for One Year
50 GB of Block Storage Free to Use for One Year
50 GB of Snapshots Free to Use for One Year

New York, NY

100 Delawanna Ave, Suite 1

Clifton, NJ 07014

United States

San Francisco, CA

2820 Northwestern Pkwy,

Santa Clara, CA 95051

United States

Dallas, TX

2323 Bryan Street,

Dallas, Texas 75201

United States

Ashburn, VA

1807 Michael Faraday Ct,

Reston, VA 20190

United States

Orlando, FL

440 W Kennedy Blvd, Suite 3

Orlando, FL 32810

United States

Toronto, Canada

20 Pullman Ct, Scarborough,

Ontario M1X 1E4


London, UK

14 Liverpool Road, Slough,

Berkshire SL1 4QZ

United Kingdom