ubuntu - tips & tricks

How to install magento on ubuntu

There are a number of blog posts available online which attempt to explain how to install magento on ubuntu for  development. However, having spent the best part of an evening following a vast majority of the sites going through this exercise, I found they were all either incomplete, out of date or just completely inaccurate.

This article will attempt to fill the void and aim to provide a complete guide on how to successfully and completely install magento on a ubuntu desktop in order to carry out some magento development.

to install magento on ubuntu you will need to configure your desktop to make use of the LAMP stack, which primaritly means Linux, Apache, MySQL and PHP, therefore you will need install Apache mySQL and PHP onto your local machine.

I have previously written a blog post about configuring your ubuntu desktop for LAMP server development ,  Install and Configure a LAMP Server on Ubuntu Desktop or alternatively you can install each component separately as detailed below. Making using of the TaskSel is my preferred approach to quickly configure my desktop. However, I have provided below  a step by step guide to setting up your workstation.

To follow along using the tutorial you will need to open a terminal window and enter these following commands

1. Install apache server

Start your apache web server

Open you Apache configuration file using gedit your default text file editor

N.B. I assume you are installing magento onto a vanilla machine and you have not previously configured it as something else.

I usually delete all the contents of the configuration file and just have it as below. I find all the other comments etc too confusing.
Save and exit the file. Restart your apache server
2. Install mySQL
You’ll be prompted for a root password, enter one that you would like to use and remember it.

Start up your mySQL server

Create a database and user for magento

Create a User with name of Magento and a Password of magento

3. Install PHP

install the php xml parser

Increase the memory limit for PHP by altering the PHP configuration file

Change memory limit from


Save the file and close

You will need to enable the mcrypt. Mcrypt is an encryption alogrithm library that uses several modern algorithms such as AES.  Magento makes use of mcrypt so you will need to enable it.

You will also need to enable curl


4. Download and install magento
Download magento to your temporary folder

extract the downloaded files and move them to the working folder

set up some permissions

Restart apache web server again

5. Install Magento
We can now actually install magento, this should now be relatively straight forward.
Open your browser and navigate o localhost, and the following screen should be displayed.
Magento installation wizard

Agree to the terms and conditions. In the following screen just enter the details that we created
host = localhost User: magento password magento

Magento Create Admin account screen

Gary Woodfine

Freelance Full Stack Developer at threenine.co.uk
Helps businesses by improving their technical proficiencies and eliminating waste from the software development pipelines.

A unique background as business owner, marketing, software development and business development ensures that he can offer the optimum business consultancy services across a wide spectrum of business challenges.

Affiliate Disclaimer

Disclosure: Please note that some of the links included in the blog posts are affiliate links, which means I will earn a commission if you decide to make a purchase.

I only include affiliate links to products, services and companies that I have personal experience and have actually used. I only recommend them because they are helpful and useful, not because of the small commissions I make if you decide to buy something.

Please do not spend any money on these products unless you feel they are relevant, suitable and will help you achieve your goals.

Buying anyone of these products and the commisions earned will not make me an overnite multi millionaire, but they will help to cover the hosting costs and compensate for the countless hours and effort I put in to create meaningful and valuable free content I provide to help others succeed.

You've also undoubtedly noticed that I also use various advertising networks - unless of of course you're using an Ad blocker, this is also an attempt to reduce my monthly deficit I experience in providing free relevant, valuable and on occassion insightful content for the benefit of others.

I only really make some money if people click on the ads, unless of course you consider 1c per 1000 impressions real money!

Bear in mind just how many impressions I need to make before I can cover my £20 hosting costs a month!

If you are using an adblocker and guilt stricken you can of course donate using any of the buttons below, but I won't be holding my breath.

Buy me a coffeeBuy me a coffee