Menu
MageQuest Logo
MageQuest
Search
MageQuest Logo

Install & Setup

Apprentice
June 30, 2019
2.3.x
Getting started

This article covers just the concepts of how Magento 2 can be installed via the different options available, including our recommendations.

The 'Quest' tab will provide the actual guidance (mainly links to official resources) of how to get setup.

Before we begin

Before we look at how Magento 2 can be installed, you're going to need a development environment. We want to remain as impartial as possible here, but also not get deep into how to configure and support local environments.

We're not going to discuss in depth what system requirements you need for each version of Magento 2 (e.g. specific PHP versions or in depth database setup etc.), but rather just provide guidance on the key choices to make when installing Magento 2.

Therefore for now we are going to provide a simple list of recommended development environments to use:

In addition to the above, there is a longer list of community provided development environments on the MageRes GitHub page.

Recommend something else?

If you'd like to suggest another development environment to link above, please contact us.

High level system requirements

The below are the key technologies Magento 2 needs and all should be covered by the development environment you choose to use:

  • Webserver - Apache or NGINX
  • PHP - use the latest version of PHP 7 supported by the version of Magento 2 you're installing, whilst older versions do support PHP 5.6, using unsupported and unsecure PHP versions is not recommended, nor are they particularly performant
  • Database - MySQL (or variants such as MariaDB or Percona)
System requirements

See full list of requirements on Magento DevDocs.

There's more than one way to get Magento 2

There are 3 main ways to install Magento 2:

  1. Downloading the source code as a compressed file and extract
  2. Using composer
  3. Cloning from GitHub

For the majority of your interactions with Magento 2 (including working with examples / challenges on MageQuest), we recommend installing via composer as it is the preferred method of getting the software and puts you in full control, including whether you want to exclude or add certain packages.

Cloning from GitHub is only suitable for if you want to contribute code back to the core Magento codebase (i.e. make changes and open a pull request).

The first option, in reality, does little more than skip over the initial composer setup, however if you want to get up and running initially with this method we won't judge!

Again, we're not covering how to action this process, here, but some guidance will be provided in the 'Quest' tab of this article.

Use composer

Essentially, if you're ever likely to be managing a Magento 2 instance in a production environment, you should be managing the software (e.g. updates, new extension or theme installs) using composer and therefore it is recommended to get acquainted with this install method.

For more details see Magento DevDocs.

Ways of installing Magento 2

Once you've actually got Magento 2 downloaded to your local environment and ensured all composer dependencies are installed, it's time actually install the Magento 2 software and Magento provides 2 ways to achieve this:

  • Via the Web Setup Wizard (using a browser)
  • Via the CLI (Command Line Interface)

The setup wizard is by far the simplest and most user friendly way to install Magento 2 (even for a hardened CLI user) and can be accessed by visiting the following page 'https://{your-magento-domain}/setup' where {your-magento-domain} is the domain of your local environment (this is configured / set based on the development environment you are utilising).

The CLI install method is great if you know exactly what you need all up front, but it is cumbersome to type out each value within the terminal and prone to error. It's real benefit / use case is for automating the install process (e.g. for a continuous development pipeline).

How about some products?

A default install of Magento 2 contains no additional configuration or catalog(ue) data (products/categories) of any type.

For a real Magento project, obviously the merchant would provide the products they need for their store.

However, for the purpose of learning Magento 2, it's fairly vital to have some data to work with in order development certain areas of the site.

Thankfully Magento provides a sample data pack, which can be installed via composer. Details on how to install this will be provided in the 'Quest' tab.