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

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

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.


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.

<img style=“border:2px solid black; display:block;margin-left:auto;margin-right:auto” src=“https://assets.digitalocean.com/articles/civicrm/drupal_modules.png” alt =“Drupal modules” />

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


<img style=“border:2px solid black; display:block;margin-left:auto;margin-right:auto” src=“https://assets.digitalocean.com/articles/civicrm/drupal_civi_download.png” alt =“Drupal CiviCRM download” />

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

<img style=“border:2px solid black; display:block;margin-left:auto;margin-right:auto” src=“https://assets.digitalocean.com/articles/civicrm/drupal_civi_installation.png” alt =“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:

<pre> GRANT ALL ON civicrm.* TO civiuser@localhost IDENTIFIED BY ‘<span class=“highlight”>password</span>’; </pre>

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:

<pre> http://<span class=“highlight”>your_domain_or_IP_address</span>/sites/all/modules/civicrm/install/index.php </pre>

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.

<img style=“border:2px solid black; display:block;margin-left:auto;margin-right:auto” src=“https://assets.digitalocean.com/articles/civicrm/drupal_civi_database.png” alt =“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.

<img style=“border:2px solid black; display:block;margin-left:auto;margin-right:auto” src=“https://assets.digitalocean.com/articles/civicrm/drupal_civi_ready.png” alt =“Drupal CiviCRM ready” />

You will get a page that looks like this:

<img style=“border:2px solid black; display:block;margin-left:auto;margin-right:auto” src=“https://assets.digitalocean.com/articles/civicrm/drupal_civi_success.png” alt =“Drupal CiviCRM installation success” />

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

<img style=“border:2px solid black; display:block;margin-left:auto;margin-right:auto” src=“https://assets.digitalocean.com/articles/civicrm/drupal_civi_access.png” alt =“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:

<pre> <span class=“highlight”>domain_name_or_IP_address</span>/administrator </pre>

<img style=“border:2px solid black; display:block;margin-left:auto;margin-right:auto” src=“https://assets.digitalocean.com/articles/civicrm/joomla_admin_login.png” alt =“Joomla admin login” />

Log in with your administrator credentials.

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

<img style=“border:2px solid black; display:block;margin-left:auto;margin-right:auto” src=“https://assets.digitalocean.com/articles/civicrm/joomla_extension.png” alt =“Joomla Extension Manager” />

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


<img style=“border:2px solid black; display:block;margin-left:auto;margin-right:auto” src=“https://assets.digitalocean.com/articles/civicrm/joomla_install_path.png” alt =“Joomla CiviCRM path” />

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

<img style=“border:2px solid black; display:block;margin-left:auto;margin-right:auto” src=“https://assets.digitalocean.com/articles/civicrm/joomla_install_success.png” alt =“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:

<pre> GRANT ALL ON civicrm.* TO civiuser@localhost IDENTIFIED BY ‘<span class=“highlight”>password</span>’; </pre>

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.

<img style=“border:2px solid black; display:block;margin-left:auto;margin-right:auto” src=“https://assets.digitalocean.com/articles/civicrm/wordpress_plugins.png” alt =“WordPress plugins” />

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

<img style=“border:2px solid black; display:block;margin-left:auto;margin-right:auto” src=“https://assets.digitalocean.com/articles/civicrm/wordpress_civi_activate.png” alt =“WordPress CiviCRM activate” />

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

<img style=“border:2px solid black; display:block;margin-left:auto;margin-right:auto” src=“https://assets.digitalocean.com/articles/civicrm/wordpress_civi_menu.png” alt =“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.

<img style=“border:2px solid black; display:block;margin-left:auto;margin-right:auto” src=“https://assets.digitalocean.com/articles/civicrm/wordpress_civi_database.png” alt =“WordPress CiviCRM database” />

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

Click the “Check Requirements and Install CiviCRM” button.

<img style=“border:2px solid black; display:block;margin-left:auto;margin-right:auto” src=“https://assets.digitalocean.com/articles/civicrm/wordpress_civi_success.png” alt =“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”.

<img style=“border:2px solid black; display:block;margin-left:auto;margin-right:auto” src=“https://assets.digitalocean.com/articles/civicrm/civi_synchronize.png” alt =“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”.

<img style=“border:2px solid black; display:block;margin-left:auto;margin-right:auto” src=“https://assets.digitalocean.com/articles/civicrm/civi_config_checklist.png” alt =“CiviCRM config checklist” />

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

<img style=“border:2px solid black; display:block;margin-left:auto;margin-right:auto” src=“https://assets.digitalocean.com/articles/civicrm/civi_checks.png” alt =“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.

<div class=“author”>By Justin Ellingwood</div>

Thanks for learning with the DigitalOcean Community. Check out our offerings for compute, storage, networking, and managed databases.

Learn more about us

About the authors

Still looking for an answer?

Ask a questionSearch for more help

Was this helpful?
Leave a comment

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Join the Tech Talk
Success! Thank you! Please check your email for further details.

Please complete your information!

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel