How to Install Magento 2 via GitHub

- Magento 2

Magento 2 Installation Guide

We’ve already mentioned the Magento 2 installation guide by Ivan Veres on our website. The author provides a brief description of how to install Magento 2 via three different methods: from archive file, via Composer, and via GitHub. We’ve also decided to share this information via our blog but in three separate posts, so on Firebear, you can already find out How to Install Magento 2 via Composer and How to Install Magento 2 from Archive File. And below, we shed light on the last method – installation via GitHub. It is not the easiest way to get Magento 2 installed, but if problems do not scare you, continue reading.

We show how to install Magento 2 on Linux Ubuntu 16.04 with PHP 7.0.7, Composer 1.1.2, and MySQL 5.7.12. A virtual host is necessary to rule all your Magento 2 installations. Ivan Veres says that his installations can be found here: http://m2.loc/2.07/.

Third, and the last one, is cloning or downloading release from GitHub repository.

Also note that below we avoid using Setup Wizard, so quickly skip the tutorial and choose another approach to installation if this one seems too scary. Consider the following information before going any further:

  • Magento 2 will be installed through terminal.
  • Core code will be stored under app/code.
  • It will be impossible to update Magento 2 via admin.

Why were these difficulties even created? If you are a vendor or a marketer, there is no need to suffer such digital austerities. But in case you are a developer or a contributor, feel free to leverage Magento 2 GitHub releases to make the platform better or at least get a deeper insight on how thing are done beneath the hood. So, let’s start!

How to Install Magento 2 via GitHub

1. Clone Magento 2 repo from here or download a necessary release here.

2. Create a new empty directory.

3. Run the following command:

4. Wait until the deployment is finished.

5. Enter the following command:

6. Install Magento 2.

Below, you can see the example of the command that installs Magento 2. You should change base-url, db-name, db-password, admin-email, and admin-password. They should match your local setup.

7. Open your browser and visit you local link (in our case it is http://m2.loc/2.07/github/).

8. If everything is ok, Magento 2 was installed successfully.

Now, let’s figure out what to do with sample data in case of Magento 2 installation via GitHub.

1. Go to your web root (it’s not magento2).

2. Run this command:

3. Then, go to the cloned Magento 2 directory.

4. Run the following command:

Symlinks to your Magento 2 installation are created.

5. For Linux machine, set ownership and permissions:

6. Clear cache (static files):

  • Go to Magento 2 var/ folder
  • Run this command:

7. Run the following commands to install sample data:

For further information, visit the official Magento 2 installation guide and check the corresponding Inchoo post.