We hope you find this tutorial helpful. In addition to guides like this one, we provide simple cloud infrastructure for developers. Learn more →

How To Install CiviCRM with WordPress, Drupal, or Joomla on Ubuntu 12.04

Posted Sep 30, 2013 17.5k views WordPress Joomla Drupal Apache MySQL PHP Ubuntu


CiviCRM is a customer relationship management suite that can use Drupal, Joomla!, or Wordpress to track contacts and their relationships to projects and initiatives.

In this guide, we will discuss how to install CiviCRM on all three of these platforms on top of an Ubuntu 12.04 installation.


This guide assumes that you have installed LAMP (Linux, Apache, MySQL, and PHP) on your Ubuntu 12.04 VPS. If you have not done so already, follow this guide to install LAMP on Ubuntu.

You will also have to decide which content management system (CMS) that you wish to use with CiviCRM. The CMS of your choice will have to be installed prior to undertaking the CiviCRM installation, but we will cover that in each CRM section.


Drupal is a popular CMS choice. Follow this link to install Drupal on an Ubuntu VPS if you haven't done so already.

Be sure to substitute the most recent version of Drupal for the version in that guide.

Download and Install the Module

We will make sure that the web user has ownership of the Drupal files by executing the following lines of code:

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

Next, log into your Drupal site as an administrator using the credentials you established during installation.

Go to the "Modules" tab at the top of the page. Click on the "Install new module" link.

Drupal modules

Enter this URL for the CiviCRM Drupal package into the "Install from a URL" field. Click "Install".


Drupal CiviCRM download

You should get a notification telling you that the installation was successful:

Drupal CiviCRM installation

Configure MySQL

Next, we will create a database specifically for CiviCRM. In you terminal, log into MySQL with the following command:

mysql -u root -p

Type the root MySQL password to get a new prompt. Create the CiviCRM database, which we will call civicrm, with this command:


Next, we will assign permissions on this database to a new user with a password we choose:

GRANT ALL ON civicrm.* TO civiuser@localhost IDENTIFIED BY 'password';

Now, implement the changes and exit out of the MySQL prompt with these commands:


Run the Installation Script

Next, we will actually go through the CiviCRM install script. Access this by going to the following URL:


You will see a lot of red on the page initially because we haven't inputted our data yet.

Fill out the credentials to the CiviCRM database and the Drupal Database.

Drupal CiviCRM database info

When you are finished, click on the "Re-check requirements" button. You should see green banners telling you that everything is ready.

If you want some sample data, be sure to check the "Load sample data" check box. Click the "Check Requirements and Install CiviCRM" button.

Drupal CiviCRM ready

You will get a page that looks like this:

Drupal CiviCRM installation success

You can access CiviCRM through a link in the left-hand navigation menu of the site:

Drupal CiviCRM access


Another popular CMS is Joomla!. The installation procedures for Joomla on Ubuntu 12.04 are located here. Make sure you are substituting the most recent version of Joomla in the instructions.

Download and Install the CiviCRM Package

When you have Joomla installed, go ahead and download the CiviCRM Joomla package onto your server with the following commands:

cd /var/www/tmp
wget http://downloads.sourceforge.net/project/civicrm/civicrm-stable/4.3.5/civicrm-4.3.5-joomla.zip

We will need to install the "unzip" utility to unzip the archive:

sudo apt-get install unzip

Unzip the file with this command:

unzip civicrm-4.3.5-joomla.zip

Go to the web root and ensure that the web user has write access:

cd /var/www
chown -R www-data *

Install CiviCRM within Joomla

Go to the site administration page at:


Joomla admin login

Log in with your administrator credentials.

Click on "Extensions" in the top navigation bar and click "Extension Manager".

Joomla Extension Manager

In the "Install from Directory" field, enter the path to the CiviCRM directory we extracted:


Joomla CiviCRM path

Click "Install". You should see a confirmation page that will verify that CiviCRM was installed correctly.

Joomla CiviCRM success


WordPress can also be configured to work with CiviCRM. Click here to learn how to install WordPress on Ubuntu 12.04.

Download and Install the CiviCRM Archive

When you are ready, we will download the CiviCRM archive to the plugins directory within WordPress. We need to allow write permissions to this folder for the time being:

sudo chmod 777 /var/www/wp-content/plugins/
cd /var/www/wp-content/plugins/
wget http://downloads.sourceforge.net/project/civicrm/civicrm-stable/4.3.5/civicrm-4.3.5-wordpress.zip

Create a directory called "files" and make it writable.

mkdir files
chmod 777 files

Install the "unzip" utility to allow us to extract the archive:

sudo apt-get install unzip

Unzip the file with this command:

unzip civicrm-4.3.5-wordpress.zip

Give the web user ownership of all of the new files like this:

sudo chown -R www-data:www-data *

Configure MySQL

We need to create a separate CiviCRM database within MySQL. Log into MySQL with the root user:

mysql -u root -p

You will be given a MySQL prompt. Create a CiviCRM database:


Create a user and password and assign it privileges to the database with this command:

GRANT ALL ON civicrm.* TO civiuser@localhost IDENTIFIED BY 'password';

Implement the changes and exit out of MySQL with the following commands:


Configure the Plugin Within WordPress

Visit your WordPress site. Log in as the administrator user you created during setup.

Click on the "Plugins" section in the left-hand menu.

WordPress plugins

You should see the "CiviCRM" row within the page. Click on "Activate".

WordPress CiviCRM activate

Next, go to the "Settings" section on the left-hand menu. Click on the "CiviCRM Installer" sub-menu.

WordPress CiviCRM menu

You should be given a page with a lot of red. This is because we haven't given our CiviCRM database information yet.

Fill in the CiviCRM database settings section. If you would like to populate some sample data, check the "Load sample data" check box.

WordPress CiviCRM database

When you are ready, click "Re-Check requirements". Everything should be green.

Click the "Check Requirements and Install CiviCRM" button.

WordPress CiviCRM success

Finishing Up

Once you have CiviCRM installed on your server, there are still a few important tasks that you should complete.

First, you should import the existing users of your CMS. This will ensure that your CMS users also have CiviCRM profiles, so that you can easily track them.

Access CiviCRM through the method provided by your CMS. Click on the "Administer" heading. Navigate to "Users and Permissions" and then to "Synchronize Users to Contacts".

CiviCRM synchronize users

This will import your CMS user data into the CiviCRM database.

Next, you will want to review the included "Configuration Checklist". You can get there by clicking the "Administer" heading and then selecting the "Administration Console".

CiviCRM config checklist

Go through each of the linked items and configure your system to match your needs.

CiviCRM checklist


You should now have the CiviCRM suite of tools installed on your server. You will be able to manage the contacts for your site or organization easily.

By Justin Ellingwood


Creative Commons License