Magento2 Installation

Magento2 download by composer

1.You have to setup composer in your htdocs
2.Must be check magento prerequisites
3.Go to magento documentation and find on the left side Getting Started > Install Magento using Composer
3.Select which version is compatibility with your php
4.Avoiding so many problem just change from D:\xampp\php\php.ini

memory_limit=328M
max_input_time=300
max_execution_time=18000

extension=php_intl.dll
extension=php_soap.dll
extension=php_xsl.dll

5.Enter the following command. Obviously copy this code from Magento Open Source metapackage. Fact of (version)

php composer.phar create-project –repository-url=https://repo.magento.com/ magento/project-community-edition directoryName

or

composer create-project –repository-url=https://repo.magento.com/ magento/project-community-edition directoryName

Version specify:
php composer.phar create-project –repository-url=https://repo.magento.com/ magento/project-community-edition=2.1.7 /installation/directoryName

6.When prompted, enter your authentication keys from your magento profile.
Your public key is your username.
your private key is your password.

7.Now you can see it’s downloading so many files. After few minutes Successfully you can see
Generating autoload files

Magento2 install by command line

D:\xampp\htdocs\magento2> composer
D:\xampp\htdocs\magento2> composer install
D:\xampp\htdocs\magento2> php bin/magento setup:install

php bin/magento setup:install –base-url=http://127.0.0.1/magento2/ –db-host=localhost –db-name=test-magento2 –db-user=root –db-password= –admin-firstname=Ataur –admin-lastname=Rahman –admin-email=appointbd@gmail.com –admin-user=webTech –admin-password=webTech1234@ –language=en_US –currency=USD –timezone=America/Chicago –use-rewrites=1

Magento 2 CLI

php bin/magento help
php bin/magento list
php bin/magento indexer:reindex
php bin/magento cache:clean
php bin/magento cache:flush
php bin/magento cache:disable
php bin/magento cache:enable
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy

[doest not generate files in the pub/static folder. Try to run below command]
php bin/magento setup:static-content:deploy -f

Set the Magento mode

Developer mode:
You should use the Developer mode while you are developing customizations or extensions

php bin/magento deploy:mode:show
php bin/magento deploy:mode:set developer

Production mode:
You should run Magento in Production mode once it is deployed to a production server. Production mode provides the highest performance in Magento 2.

Install sample data after Magento

Do not install sample data if your Magento application is set for production mode. Switch to developer mode first. Installing sample data in production mode fails.

php bin/magento sampledata:deploy

If you’re installing sample data after installing Magento, you must also run the following command to update the database and schema:

php bin/magento setup:upgrade
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s