Magento installation using composer
- By Preneesh AV --
- 10-Apr-2019 --
- 128 Comments
Magento installation using composer
Install composer by downloading it:
curl -sS https://getcomposer.org/installer | php
We require authorisation key to access magento repos. These keys can be used for authorized downloads of the Magento 2 platform, extensions, and themes.
Go to URL:
https://marketplace.magento.com/customer/accessKeys/
Choose option : "Create new access keys"
To start installation from terminal switch to non root user and run the following command:
The command will create a folder magento with community edition files:
composer create-project --repository=https://repo.magento.com/ magento/project-community-edition /home/cpanelusername/public_html/magento
installation will prompt to enter the access key and password for downloading the files
Dependency or requirements that may come accross:
Composer may encounter memory limit error which can be viewed at
https://getcomposer.org/doc/articles/troubleshooting.md#memory-limit-error and solution for this to run the command
php -d memory_limit=-1 composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition /home/cpanelusername/public_html/magento
PHP Version Requirement for magento
- magento/magento2-functional-testing-framework 2.3.14 requires php 7.0.2|7.0.4|~7.0.6|~7.1.0|~7.2.0 -> your PHP version (5.6.40) does not satisfy that requirement.
- magento/product-community-edition 2.3.1 requires php ~7.1.3||~7.2.0 -> your PHP version (7.0.33) does not satisfy that requirement.
Using WHM MultiPHP Manager update php version to 7.1 for the domain / cpanel user where magento is being installed
Possible requirement of PHP extenstion php-iconv and php-intl for php version 7.1
- magento/product-community-edition 2.3.1 requires ext-iconv * -> the requested PHP extension iconv is missing from your system.
For enabling required php extension in EasyApache 4, choose th "php extensin" tab and choose required extension for php version
ea-php71-php-iconv-7.1 for php version 7.1
php71-php-intl
Press button Review and after review
Press button Provision to install the same.
On Browsing the page of magento installation some time 500 server error may encounter.
i. check apache access.log / error.log for more details
ii. some cases mod_env and mod_version for apache need to be installed.
Go to EasyApache 4- choose apache modules and choose mod_env. Then click review and provision button to install it