:::: MENU ::::
How to install magento on localhost
Software

How to install magento on localhost

Magento is a revolutional ecommerce software product. Magento is an open-source eCommerce web application. Magento has become one of the most popular open source ecommerce application in the industry. It was developed by Varien (now Magento Inc) with help from the programmers within the open source community but is owned solely by Magento Inc. Magento was built using the Zend Framework. The Magento Community Edition is the only free version of Magento available.

NB: RELATED POSTS

Magento installation on localhost WAMP server.
Magento installation on localhost LAMP server with sample data.
Magento installation on localhost WAMP server with sample data.

Magento installation on localhost LAMP Server.

Steps to install magento e-commerce platform on Linux Ubuntu 12.04.

how to install magento on linux lamp server

  1. Install LAMP server.

    You can use the steps explained on this post to install lamp server
    [ Tested Version: Linux Ubuntu 12.04 , Apache Version: 2.2.22-1ubuntu1, PHP Version: 5.3.10-1ubuntu3.2, MySQL Version: 5.5.24-0ubuntu0.12, phpmyadmin: 3.4.10.1deb1 ]

  2.  

  3. Download latest version of magento from magento community edition download page.
    [ Tested Version: magento-1.7.0.2 ]
  4.  

  5. Extract the downloaded magento version (magento-1.7.0.2.zip). Copy and paste Magento (or folder name) folder in to www directory of the LAMP server.

    You can access local web server root directory on Ubuntu 12.04,

    Go to Terminal [ Ctrl+Alt+T ]
    Type sudo nautilus hit Enter,
    Type password hit Enter, a new window opens,

    Go to downloaded folder ( File System – home – username – downloads OR if you want to copy the setup from other folder(windows folders) than ubuntu file system, first mount that folder in to ubuntu ) and copy Magento (or folder name) folder in to File System – var – www .

    Close the window and also type exit to close terminal.

  6.  

  7. Create a MySQL database support for Magento installation on your LAMP server phpMyAdmin interface as shown below. ( You can access phpmyadmin interface on ubuntu by entering http://localhost/phpmyadmin/ on your favorite web browser. )

    Write down the database name, user name, and password as you will need these later.

    a) Create New Database.

    phpMyAdmin -> Click on Databases menu -> Create database – Enter database name –> Create.

    b) Add a new database user with password.

    NB: It is not a good practice to use ‘root’ user for all databases due to security reasons. Read this post, SQL injections attack php.

    phpMyAdmin -> Click on Privileges menu -> Hit Add user-> Add user pop up box appears -> Enter database username and password, select ‘Local’ on Host: dropdown option -> Drag down hit ‘Check All’ on Global privileges -> hit on ‘Add User’ button.

    c) Add user to the Database.

    phpMyAdmin -> Click on Privileges menu -> Select username -> Edit privileges -> Edit privileges pop up box appears,

    magento installation on localhost

    Drag down to Database-specific privileges menu -> Select Database name from drop down

    magento installation on lamp

    The page will refresh-> Check all Database-specific privileges -> ‘Go’.

  8.  

  9. The next step is to make sure that you are loading all required PHP extensions php_curl, php_ mcrypt, php_pdo, php_pdo_mysql for magento install. So check this on info.php .

    The latest lamp server install loads the PHP extensions “php_ mcrypt, php_pdo, php_pdo_mysql” as default. So you have to load the php extension curl.dll.

    For this go to synaptic package manager, and install php5-curl. For made this effect on server “Restart Apache 2 Server”.

    Go to Terminal [ Ctrl+Alt+T ]
    Type sudo /etc/init.d/apache2 restart hit Enter.

    OR

    Open Terminal [ Ctrl+Alt+T ]
    And login on your “ubuntu server”, login as root, for this type sudo -i hit Enter and type your “password”.
    Your prompt changes from “$” to ubuntu server “#”.
    Then type, /etc/init.d/apache2 restart enter.
    exit and logout. And close terminal.

    Check in info.php and make sure you are loading: php_curl, php_ mcrypt, php_pdo, php_pdo_mysql.

  10.  

  11. Magento installation takes more time on each step installation in comparison with other CMS. Because magento uses a configuration based MVC on Zend framework, the setup contains approximately 350 tables on database.

    Now enter http://localhost/magento(or folder name)/ on your browser for installation,

    You may get a permission “Error” message like ‘You don’t have permission to access /magento/ on this server. Apache/2.2.22 (Ubuntu) Server at localhost Port 80’. If error occurs, set correct permission for var/www/magnto folder.

    Open Terminal [ Ctrl+Alt+T ]
    And login on your “ubuntu server”, login as root, for this type sudo -i hit Enter and type your “password”.
    Your prompt changes from “$” to ubuntu server “#”.
    Then type, chown -R www-data /var/www/magento enter.
    exit and logout. And close terminal.

    Step-by-Step Installation Wizard

    Enter http://localhost/magento on your favorite web browser. Just proceed as explain below.

    a. First step, Click on the check box “I agree to the above terms and conditions” and click on the Continue button.

    b. In Second step, leave localization to its default values and Click on Continue.

    c. In the Third step, enter the database name, database user name, database user password, & check-Skip Base URL Validation before the Next Step and click on Continue. (This step will take 1 minute or more, since this step stores the tables in the database).

    d. In Fourth step enter your personal information and login information (admin name & password for dashboard) and don’t forget to write down admin password. (Leave encryption key). Click on Continue.

    e. In the Final step, please make a note of your encryption key and make sure you keep it in a safe place. (Magento uses it to encrypt passwords, credit cards and more).

  12.  

  13. Installation completed. Now you can open Frontend (http://localhost/magento (or folder name)/) and Backend (http://localhost/magento (or folder name)/index.php/admin/ ) on your browser.
  14.  

    magento on localhost linux ubuntu lamp

All the best!!!

Leave a comment

Before hitting COMMENT button, please fill * marked fields and the correct reCAPTCHA response.
  •