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

PostedSeptember 30, 2013 20.2k views WordPress Joomla Drupal Apache MySQL PHP Ubuntu

Status: Deprecated

This article covers a version of Ubuntu that is no longer supported. If you are currently operate a server running Ubuntu 12.04, we highly recommend upgrading or migrating to a supported version of Ubuntu:

Reason: Ubuntu 12.04 reached end of life (EOL) on April 28, 2017 and no longer receives security patches or updates. This guide is no longer maintained.

See Instead:
This guide might still be useful as a reference, but may not work on other Ubuntu releases. If available, we strongly recommend using a guide written for the version of Ubuntu you are using. You can use the search functionality at the top of the page to find a more recent version.

Introduction


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.

Prerequisites


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


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".

http://downloads.sourceforge.net/project/civicrm/civicrm-stable/4.3.5/civicrm-4.3.5-drupal.tar.gz

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:

CREATE DATABASE civicrm;

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:

FLUSH PRIVILEGES;
exit

Run the Installation Script


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

http://your_domain_or_IP_address/sites/all/modules/civicrm/install/index.php

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

Joomla!


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:

domain_name_or_IP_address/administrator

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:

/var/www/tmp/com_civicrm

Joomla CiviCRM path

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

Joomla CiviCRM success

WordPress


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 DATABASE civicrm;

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:

FLUSH PRIVILEGES;
exit

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

Conclusion


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

0 Comments

Creative Commons License