Read More
Menu Close

    Magento 1.9.* Installation using CLI

    Magento is an e-commerce based open-source platform which is written in PHP. Magento provides three different platforms,

    • Magento Community Edition
    • Magento Enterprise Edition
    • Magento Enterprise Cloud Edition

    This article will demonstrate how to install Magento 1.9 via CLI (Command-line interface).

    Download Releases For Magento Community Edition 1.x

    Download recent release for Magento community edition 1.x from below url,
    https://magento.com/tech-resources/download

    PLACE DOWNLOADED FILE INSIDE DIRECTORY

    If zip file is downloaded then run below command to unzip downloaded file

    Searching for an experienced
    Magento Company ?
    Read More
    unzip magento-1.9.3.1-2016-11-14-06-05-09.zip

    If tar file is downloaded then run below command to untar downloaded file

    tar xf magento-1.9.3.1-2016-11-14-06-05-09.tar

     

    Magento InstallATION

    • After unzip/untar download file one directory (magento) will be created.
    • Go inside that directory using below command,
      cd magento/
    • To install magento you must have below thing,
      • Database host
      • Database name
      • Database user
      • Database password
      • Domain in which Magento will be install
    • So before installing Magento create a database by following below instruction
      • Login to mysql server using below command,
        mysql -uDB_User -pDB_Password -hDB_Host
      • Create DB using below command,
        create database my_db;
      • To check created database on your mysql server run below command,
        show databases;
      • Then exit from the mysql user account using below command,
        exit
    • Now run below command to install Magento
      php -f install.php -- --license_agreement_accepted yes \
      --locale en_US --timezone "America/Los_Angeles" --default_currency USD \
      --db_host localhost --db_name my_db --db_user DB_User --db_pass DB_Password \
      --db_prefix wk_ \
      --url "http://domain.com/magento/" --use_rewrites yes \
      --use_secure yes --secure_base_url "http://domain.com/magento/" --use_secure_admin yes \
      --admin_lastname Test --admin_firstname Webkul --admin_email "[email protected]" \
      --admin_username admin --admin_password admin123
      • locale : Place language code like “en_US” which want to use in Magento.
      • timezone: Place timezone which want to use in Magento.
      • default_currency : Place currency which want to use in Magento.
      • db_host: Place db host where database server is hosted.
      • db_name: Place db name where all tables will be create during installation.
      • db_user: Place db user
      • db_pass: Place db password
      • db_prefix: Place prefix if wanted to use prefix for table name which will create during installation.
      • url: Place domain where Magento will be install
      • admin_username: Place Magento admin login user.
      • admin_password: Place Magento admin password.
    • After running above command a success message with encryption id will appear which will assure for successful installation.

    So this is how to install Magento using CLI. Hope above article will help to install Magento 1.* and thank you for viewing Magento Installation article using CLI.

    Please do comments by here if have any query regarding above article !!

    . . .
    Discuss on Helpdesk

    Leave a Comment

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


    2 comments

  • faizan
    I’m getting this error while trying to follow the above installation via cli

    FAILED
    The URL “http://magento-testing.com/” is not accessible.
    ERROR: Unable to read response, or response is empty

    • Ashish Singh (Moderator)
      Hi, Faizan

      Thanks for sharing this issue with us. In order to avoid this error, you are required to pass the “–skip_base_url_validation 1” argument along with the installation command like below,

      php -f install.php — –license_agreement_accepted yes \
      –locale en_US –timezone “America/Los_Angeles” –default_currency USD \
      –db_host localhost –db_name my_db –db_user DB_User –db_pass DB_Password \
      –db_prefix wk_ \
      –url “http://domain.com/magento/” –use_rewrites yes \
      –use_secure yes –secure_base_url “http://domain.com/magento/” –use_secure_admin yes –skip_base_url_validation 1 \
      –admin_lastname Test –admin_firstname Webkul –admin_email “[email protected]” \
      –admin_username admin –admin_password admin123

      Hope the above solution will fix the error which currently you are getting. Feel free to ask in case you still have the same query.

      Thanks,
      Ashish Singh

  • Back to Top

    Table of Content