Installing Mahara

7 min read

What will you need?

Before you can install Mahara, you will need to have access to a Linux server. It may be that you run Linux on a laptop or desktop at home or that your company or institution has its own Linux servers, in which case, great! If not, there are many hosting services available on the Internet, which will enable you to access a Linux server and therefore run Mahara.

It is important that you get a server to which you have root access. It is also important that you set your server up with the following features:

  • Database: Mahara must have a database to work. The databases supported are PostgreSQL Version 8.1 or later and MySQL Version 5.0.25 or later. The Mahara developers recommend that you use PostgreSQL, if possible, but for most installations, MySQL will work just as well.
  • PHP: Mahara requires PHP Version 5.1.3 or later.
  • Web Server: The preferred web server is Apache.
  • PHP extensions:
    • Compulsory Extensions: GD, JSON, cURL, libxml, SimpleXML, Session, pgSQL or Mysqli, EXIF, OpenSSL or XML-RCP (for networking support)
    • Optional Extension: Imagick

Ask your resident IT expert about the features listed above if you don’t understand what they mean.

A quick way to install some of the software listed above is to use the apt-get install command if you are using the Ubuntu/Debian Linux systems. See to find out more.

Downloading Mahara

It’s time for action. Let’s start by seeing how easy it is for us to get a copy of Mahara for ourselves, and the best part is… it’s free!

Time for action – downloading Mahara

  1. Go to Click on the download button on the Mahara home page. The button will be labeled with the name of the current version of Mahara:

    Installing Mahara

  2. You will now see a web page that lists all the various versions of Mahara, both previous and forthcoming versions, in Alpha and Beta. Choose the most recent version from the list in the format you prefer. We recommend that you use the .tar.gz type because it is faster to download than .zip.
  3. You will be asked if you would like to open or save the file. Select Save File, and click OK.
  4. That’s all there is to it. Go to your Internet downloads folder. In there, you should see your newly downloaded Mahara package.

What Just Happened?

You have just taken your first step on the road to installing Mahara. We have seen the website we have to go to for downloading the most recent version and learned how to download the package in the format we prefer.

Using the command line

The best way of installing and administering your Mahara is to use the command line. This is a way of writing text commands to perform specific tasks, rather than having to use a graphical user interface. There are many things you can do from the command line, from common tasks such as copying and deleting files to more advanced ones such as downloading and installing software from the Internet.

A lot of the things we will be doing in this section assume that you will have Secure Shell Access to your server through the terminal command line.

If you have a Linux or a Mac computer, you can use the terminal on your machine to SSH into your web server. Windows users can achieve the same functionality by downloading a free terminal client called PuTTY from Speak to your resident IT expert for more information on how to use the terminal, or see an introduction to the Linux command line.

For now, let’s just learn how to get the contents of our downloaded package into the correct place on our server.

Time for action – creating your Mahara file structure

  1. Copy the mahara- 1.2.0.tar.gz package you downloaded into your home directory on your web server. If you are copying the file to the server from your own computer, you can do this using the scp command (on Linux or Mac):

    scp mahara-1.2.0.tar.gz servername:pathtohomedirectory

    On Windows, you may prefer to use a free FTP utility such as FileZilla (

  2. Unpack the contents of the Mahara package on the Linux server. On the terminal, you can do this using the tar command:

    tar xvzf mahara-1.2.0.tar.gz
  3. You will now see a new folder called mahara-1.2.0; you will need to rename this to public. To do this on the terminal, you can use the mv command:

    mv mahara-1.2.0 public
  4. That’s it! The Mahara code is now in place.

What Just Happened?

You just learned where to copy the Mahara package on your server and how to extract its contents.

Creating the database

A lot of the information created in your Mahara will be stored in a database. Mahara offers support for both PostgreSQL and MySQL databases. However we prefer to use PostgreSQL. If you are interested, see for a discussion on why PostgreSQL is preferred to MySQL.

The way you create your database will depend on who you have chosen to host your Mahara. Sometimes, your web host will provide a graphical user interface to access your server database. Get in touch with your local IT expert to find out how to do this.

However, for smaller Mahara installations, we often prefer to use something like phpPgAdmin, which is a software application that allows you to manage PostgreSQL databases over the Internet. See for more information on setting up phpPgAdmin on your server.

Also see, for phpMyAdmin which works in a very similar way to phpPgAdmin but operates on a MySQL database.

For now, let’s get on with creating a Postgres database using our phpPgAdmin panel.

Time for action – creating the Mahara database

  1. Open up your phpPgAdmin panel from your Internet browser and log in. The username is hopefully postgres. Contact your admin if you are unsure of the database password or how to locate the phyPgAdmin panel.

    Installing Mahara

  2. On the front page there is a section that invites you to create database, click there. Give your database a relevant name such as mysite_Mahara. Make sure you select the UTF8 collation from the drop-down box. Finally, click Create.

    Installing Mahara

  3. If you want to, it is a good idea to have a new user for each database you create. Use phpPgAdmin to create a new user.
  4. That’s it, you’re done!

What Just Happened?

We just created the database for our Mahara installation using the open source phpPgAdmin tool available for Linux. Another way to create the database on your server is to use the database command line tool.

Have a go hero – using the command line to create your database

Using the command line is a much more elegant way to create the database and quicker once you get the hang of it. Why not have a go at creating the database using the command line? For instructions on how to do this see the database section of the Mahara installation guide:

Setting up the data directory

Most of the data that is created in your Mahara is stored in the database. However, all the files that are uploaded by your users, such as their personal photos or documents, need to be stored in a separate place. This is where the data directory comes in.

The data directory is simply a folder that holds all of the “stuff” belonging to your users. Everything is kept safe by the data directory being outside of the home directory. This set up also makes it easy for you to migrate your Mahara to another server at some point in the future.

The data directory is often referred to as the dataroot.


Please enter your comment!
Please enter your name here