Install magento 2 command line interface (CLI)

This tutorial is about Install magento 2 command line interface (cli). Often i have faced little bit of trouble while installing magento or upgrading to a newer version. Also many people complain and ask about to how to install magento via command line.So here, we will discuss particularly about magento 2 version on any system. It is quite a simple process.We will discuss one or two methods here.So moving forward, lets have a look.

So it can be done using a command which is as follows:

php bin/magento setup:install --backend-frontname="admin" --key="admin" --session-save="files"
 --db-host="localhost" --db-name="magento2" --db-user="root" --db-password="root"
--base-url="http://127.0.0.1/magento2/" --base-url-secure="https://127.0.0.1/magento2/"
 --admin-user="admin" --admin-password="admin123" --admin-email="qaisarssatti@gmail.com"
--admin-firstname="Qaisar" --admin-lastname="Satti" --use-rewrites=1

If you want to add extra setting in installation you can add language currency time zone and etc with adding following parameters.

--language=en_US
--currency=USD --timezone=America/Chicago

That’s it from this tutorial. I strongly believe there is always room for improvement.So i am open for any suggestion and feed back. Please feel free to leave what you are thinking in the comments section below. Cheers.

Qaisar Satti

Hi, I'm Qaisar Satti! I've been a developer for over 20 years, and now I love sharing what I've learned through tutorials and guides. Whether you're working with Magento, PrestaShop, or WooCommerce, my goal is to make your development journey a bit easier and more fun. When I'm not coding or writing, you can find me exploring new tech trends and hanging out with the amazing developer community. Thanks for stopping by, and happy coding!

Leave a Reply