The first step is to get the latest version of the Magento code base. In order to do that, you should visit the Magento download page (https://magento.com/tech-resources/download) and choose the latest version of Magento:
In order to have products, categories, and other useful information for our local Magento installation, we will choose the latest version from the Full Release with Sample Data (ZIP with sample data) section:
Once you download the file, you should uncompress it in the document root of your local machine.
After uncompressing the file, you should see a similar output to the following screenshot:
Now, we have the code base in place to move ahead with the installation.
There are two ways of installing Magento:
The Setup Wizard is a simple installation process that is performed from the browser.
In order to install Magento using the Setup Wizard, you should follow these steps:
http://<host name>/setup
Setup Wizard URL. The host name is the one that you assigned in your virtual host configuration for the local Magento 2 installation. For example, in this section we declared magento2-playground.dev
as the host name, so the URL for the Setup Wizard will be http://magento2-playground.dev/setup
.
When the check is performed, you will receive confirmation to move to the next step:
The command-line installation is the alternative method that Magento provides to install Magento 2 from the Terminal.
These are the steps to proceed with the installation:
php bin/magento
. You will see the output with a list of all the commands from the Magento 2 command-line tool:
composer install
If everything goes well, you should see an output similar to the following:
setup:install
to install Magento with your local configuration.That said, this is a long command and you can customize it to match your local configuration. We will review each of the parameters in the command: php bin/magento setup:install
--db-host=localhost
--db-name=magento2playground
--db-user=root
--db-password=root
--backend-frontname=admin
--admin-user=admin
--admin-password=ABC123xyz
[email protected]
--admin-firstname=Gabriel
--admin-lastname=Guarino
--base-url=http://magento2-playground.dev/
--language=en_US
--currency=USD
--use-rewrites=1
--use-secure=0
--use-secure-admin=0
db-host
: Host for your local database (localhost or 127.0.0.1)db-name
: Name of the empty database for the Magento installationdb-user
: MySQL usernamedb-password
: MySQL passwordbackend-frontname
: URL (frontname) for the Magento Admin paneladmin-user
: Username for your first admin useradmin-password
: Password for your first admin useradmin-email
: E-mail for your first admin useradmin-firstname
: First name for your first admin useradmin-lastname
: Last name for your first admin userbase-url
: Base URL for the local Magento installationlanguage
: Language for the Magento installationcurrency
: Currency for the Magento installationuse-rewrites
: Enable/disable URL rewritesuse-secure
: Enable/disable HTTPS on the frontenduse-secure-admin
: Enable/disable HTTPS in the admin panelAfter running the setup
command, you will see the following output confirming that the installation has been successfully completed:
Now that you have installed Magento on your local machine, you can access Magento using the URL that you declared before.
The URL to access the frontend will be http://magento2-playground.dev/
:
The URL to access the Admin Panel will be http://magento2-playground.dev/admin/
:
18.221.41.214