How to install Magento!
Installing Magento can be complex for the first time.
Before installation, we need to do some prerequisites.
We need to install Libsodium and install Elasticseach, and also we need to enable PHP Composer on the server.
To install them, please flow these articles:
As a first step, you will need to register a Magento account https://account.magento.com/customer/account/create/.
Login to your account.
Now navigate to https://marketplace.magento.com/customer/account.
Please click on the Market place and under My products and click on Access Keys.
Here click on the Magento2 tab and Create A New Access Key
After this, your Public and Private key will be generated for you. You will need these when the composer crates your Magento2 project.
For the next step, you will need to login to your server using SSH. To access your server via SSH first, you will need to enable SSH access to your account; to do this, please follow the article:
Also, these articles will explain how you can log in to your server using SSH.
Now that you are logged in. You will need to navigate to your public_html to do this; use thefollwing command:
Now copy the Magento version you would like to install. Currently, you can choose the Magento Open Source version or the Magento Commerce version. For more information, visit https://magento.com/compare-open-source-and-magento-commerce.
Magento Open Source:
composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition <install-directory-name>
composer create-project --repository-url=https://repo.magento.com/ magento/project-enterprise-edition <install-directory-name>
Now, copy the command of your Magento version and insert it into your SSH console, and hit enter.
Now, as a next step, the Magento repository will ask for your username and password. To your username, you will need to copy and paste your Public key that we have generated. For the password, please copy and paste your Private key and hit enter.
Now composer will create a Magento project using the Magento Open Source or Magento Commerce metapackage.
When the composer is finished, you will need to create a database for your new Magento site.
To do this, please follow our article:
The final step is to install Magento. Please note that you can only use CLI to install Magento; the Web Setup Wizard is deprecated as of Magento 2.3.6 and removed in Magento 2.4.0. As an alternative, use the command line to install or upgrade Magento, as well as extensions.
you will need to navigate to your_magento_folder/bin/
And you will need the run the installation command, please do not forget to modify the script and fill up with your data:
./magento setup:install --admin-firstname Your_first_name --admin-lastname Your_first_lastname --admin-email Your_email_address --admin-user Your_username --admin-password Your_password --base-url https://your_domain.tld --db-host Your_databse_host --db-name Your_databse_name --db-user Your_databse_username --db-password Your_database_password
These are the minimum parameters that are required to install Magento. If you want to add more parameters, please follow the official Magento documentation:
At the end of the installation, you will receive the admin login address, for example:
[SUCCESS]: Magento installation complete.
[SUCCESS]: Magento Admin URI: /admin_qjwunj
To reach your Magento admin site, type in your browser: https://your_domain.tld/admin_qjwunj
Please note that this is just an example you can be different.
And congratulations, your Magento site is now installed and ready to use.
If you are stuck or found any error during the installation please visit Magento help center:
Or contact with Magento support: