How to Install Magento

If you are developer, webmaster or store owner and want to start with magento, then first thing you should learn is, how to install magento. Once you will successfully install magento on your server you can proceed further with your eCommerce development and management activity.

In this chapter we will explore different aspect of magento Installation. Here we will learn different way of installing magento. What all required to install magento, how to secure your magento installation etc.

Pre-requisite to Install Magento

If you are a PHP developer or web developer, it is very easy for your to install magento on your local development machine. But if you are not from web development background it is new thing for your. This post is indent for both web developer and user, so we will also cover some detailed step to install pre-requite for magento installation.

Following software packages are required to install on your PC or Hosting server:

  1. Apache  version 1.3.x or 2..0.x or 2.2.x
  2. Mysql versionn 4.1.20 or newer version
  3. PHP version 5.2.13 to 5.3.15 (I did not seen any issue on the new than version 5.3.15 also) with following PHP extension
    1. Curl
    2. Dom
    3. GD
    4. Hash
    5. Iconv
    6. Mcrypt
    7. Pcre
    8. PDO
    9. PDO_Mysql
    10. SimpleXML

If you are a LAMPP developer you will be probably aware about above things so you can easily enable all required PHP extension. In latter part of this tutorial we will explore why above extension reqired to install magento.

If you are not a LAMPP developer then do not worry. You can also install magento on your PC easily by following below steps:

  1. Install XAMPP Server on your PC: XAMPP contains Apache PHP and Mysql. Download latest version of XAMPP from the official XAMPP website download section. If you face any problem in installation of xampp you can visit this xampp installation manual. If you are still facing issue in installing xampp then you can refer this youtube video.
  2. After successfully installing XAMPP start your APACHE and Mysql server in XAMPP. If you have succesfully started XAMPP now  you need enable the extensions which is compulsory to install Magento. To check what all extnesion is already loaded among the compulsory php extension of magento, open [http://localhost/xampp/phpinfo.php] in browser. You will get following page(commonly known as phpinfo page):
    PHP Info Page In browser
  3. Now search with name of every extension on the phpinfo page. For example you will search for curl extension and got following page. It means you no need to do any thing for curl extension. It is already loaded.Curl PHPinfo search
  4. Now if you do not see the extension loaded then you need to enable the corresponding PHP extension. To enable the extension not loaded you can follow the following steps. I am taking example that suppose your extension GD is not loaded.
    1. Open your xampp installation directory. Here you can find a directory with name php. Open the php directory. Here you will find a file with name php.ini. Open the php.ini files.
    2. If you are not able to locate your xampp installation directory search for file xampp-control.exe. The directory in which this file will be found is your xampp installation directory. Now repeat step 1.
    3. If you have opened your php.ini file. Now search for gd(or any extension you want to load).
    4. You will found a test like below:
      ;extension=php_gd2.dll
    5. Just remove ; from your line. indicates that your extension is commented. if you will remove ; prifix from the line means you have removed the comment. Now extension will be loaded.
    6. After removing ; prefix from all required extension, save your php.ini file.
    7. Restart your apache from xampp control panel.
    8. Now again hit URL  [http://localhost/xampp/phpinfo.php] in your browser and search for all extnesion. Now you can find the extensions.
  5. If you have successfully enabled the extension your local pc is ready for the installation of magento.

Above steps is only reqired if you want to install magento on your local pc.


If you have already purchased PHP based hosting from any hosting provider and want to install magento on your hosting then you no need to follow above steps. Please download magento compatibility checker script. Extract the downloaded zip on your local computer. Now upload file magento-check.php on your hosting server directory via FTP or any protocall you are following to upload on your server. After successfull upload hit URL: [http://{yourserver name}/magento-check.php] on your browser. It will show the compatibily test to install magento on your hosting server. You will get following screen:

Compatibility to Install Magento

If it is showing error then you need to contact your hosting support team to get all compulsory extension to install magento.

If your server (local or hosting) is completyly compatible to install magento. You can go further in this tutorial and follow step of the installation. If you are facing any issue in preparing your XAMPP server you can either go for the discussions on internet or submit your issue here in the comment section.

Steps to Install Magento

  • Step 1:  First you need to download the latest version of the magento from magento website download section. I will recommend you you to download full release. Here you have option to get your desired zip format also. Below is the snapshot.
    Magento Download
    If you do not have account on magento website then you need to create account before downloading. Extract the downloaded folder on your xampp htpdocs directory in case of local installation. Or if you are going to install on your server then you need to upload the files on your hosing server.
  • Step 2: Create a database on your mysql server. If you are a php developer then I am assuming that you have good understanding about database creation in mysql. But if you are not a developer and following my xampp installation process then you can create database using phpMyadmin tool. To create database in mysql (in xampp distribution only) please follow below steps:
    • Hit URL http://localhost/phpmyadmin/ on your browser.
    • You will get following web page by hitting above URL in your browser:
      create database snapshot
    • Click on the database tab on the homepage of phpmyadmin. If you are facing trouble in finding database tab then please refer the above image. Red border highlited tab is database tab.
    • Now on the database page in the bottom area you can get small text box with message “Create new database”. Enter name of your database which you want to use. I prefer name mage. Now click on create button.
  • Step 3: Successful completion of step 1 and step 2 is compulsory for Magento installation. So if you have downloaded and unziped magento setup in your httdocs folder and created database for magento then hit URL [http://127.0.0.1/magento] on your browser. It will open following page:
    Magento Installation Step 1Read the terms and condition and if you are agree then check the box and click on continue button.
  • Step 4: This step is for the localization setting. Here you can set locale(language in which you want to run your magento store). Timezone and currency. Folloiwng is the screenshot of the localization setting. locale setting in magento install
    if you are installing magento for review or development purpose then I can suggest you to keep this setting as it is and click on continue button.
  • Step 5: This step is the configuration setting in magento installation. In this section you will provide name of the database along with host and user details. In the database connection section change database name to mage and user name to root. No need to enter any thing if you are new for magento. Click on the continue button. This step will take several minutes because this steps perform various activity like database table creation, configuration file generation etc.
  • Step 6: This step is for the default admin account creation step.  If you have reached to this step you are almost done. Here enter the detail to create super admin account in magento. Enter the details and click to continue.
  • Final Step: If you will get following steps then you have successfully installed magento.
    Final step in magento installation

If you are facing any issue while installing magento then you can refer to http://www.magentocommerce.com/knowledge-base/entry/magento-installation-guide

 

Comments

  1. says

    Hi, I put magento into a dedicated folder called shop under our domain. Now that it’s ready so I want visitors to see it when they come to my site www. mydomain.com without ever seeing the folder shop. I have a tried a redirect and it works but my I can’t access the admin backend.

    This must be a typical requirement.

    Can you give me a suggestion?

    Thanks Chris

  2. says

    HI Ankur,

    Thanks a lot. I tried with XAMPP 1.8.3 initially to install WordPress & magento, but didn’t succeeded. But I retried with 1.82 & it was great. both installed nicely and working fine. Once again thanks a lot.

    Vivek

  3. says

    Thank you so much for sharing the detailed guide for installation with images. I had to install for the first time on my Local Machine, and it helped me a lot. :)

Leave a Reply

Your email address will not be published. Required fields are marked *


one + = six

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>