Getting started with Magento 2

Avatar image of Maarten Maarten
March 21, 2023
Magento 2 is one of the leading e-commerce platforms today. In this blog, we will learn how to get started on Magento 2 and boost your business activity right away. The most recent Magento platform version is called Magento 2. It is packaged as a different collection of features for Magento 2 Open Source, Magento

Magento 2 is one of the leading e-commerce platforms today. In this blog, we will learn how to get started on Magento 2 and boost your business activity right away.

The most recent Magento platform version is called Magento 2. It is packaged as a different collection of features for Magento 2 Open Source, Magento 2 Commerce on-prem, and Magento 2 Commerce Cloud.

Now, to get started with Magento 2, we need to first know where to find the Magento 2 Open Source. The official Magento website hosts Magento 2 Open Source. You can find a Get Open Source link to the Magento Open Source landing page as well as details on how to get started by going to Magento.com > Community > Community page.

UTOJkyJy9J7 1Icd q68eypEMPTzjh D3w4VyKOwmqE5qmSF0t3nsnbf3gP53rsFF64Ph33irtDJM s7K7QasSSFaaHWSstFuVswWJwxrkN6gZkfT2xgejLYEq 05OXLeioigNHPJ0eqTNBhZjOCt I

You can now go ahead and click the “Get Started with Open Source” button.

When you scroll down to the end of the page, you would find a “Download Open Source” button that would lead to the Magento Packages page.

From here, you can download and install the various versions, releases, security patches, migration tools, and further patches when these packages are produced and made available.

INSTALLING WITH COMPOSER

Magento 2 Open Source and Magento 2 Commerce versions use a dependency management program to handle platform dependencies called the Composer Package Manager. Magento 2 Open Source can be installed through it.

Directly from the Download page, we can download the most recent version of the Magento 2 Open Source edition as a ZIP/Archive file. In the “Download with Composer” area, click the “Get Started” button. 

MAGENTO MEGAPACKAGE

To install the most recent Magento 2 Open Source edition, we can use the Magento Metapackage that is provided in this article.

To begin installing composer, copy the following command:

cesxSUfPYjQhK8wqoDl7pYo2NARYRKKfXpro7w2FI2i4AinuldbV0CSpLMaDrQY O5piA6bHGkRhJIfIUgu5G

create-project –repository=https://repo.magento.com/ magento/project-community-edition

Paste the installation command into the command line after navigating to the document root of your web server. This command will look in the repository we gave in the —repository parameter for the most recent version of Magento 2 Open Source. The Magento project files will be extracted into a project-community-edition directory by Composer.

The download of all Magento 2 Open Source project requirements could take upto a few minutes. Then, a new project-community-edition directory would be created and would contain all of the files for the Magento project.

You can view the installed files by going to the project-community-edition directory.

Vw88h6mtikXU2d8qhm6NbcS6YR PaoUy2nGgxQY22TnUTLt9MFSps1vN3UOf54xrym1eaIac kMYInsZ2vA AIEXCg3bmubtPXwwP4Mn3JqxufrM8fkgu13yd O08iJOr9J0D1TzoWWsMCuSBk5hcK4

cd project-community-edition/

ls -la .

SETTING FILE PERMISSIONS

We must specify the appropriate file permissions for the Magento 2 Open Source project. To configure permissions for files and folders of a Magento 2 Open Source project, we must use the commands provided on the Magento Installation page.

You can copy and run the commands below in the project directory for Magento:

kcbYSB94yRypQfYp4Yd49G223hG6zSk4v4SJLUJyfLMKbZ1FV3dufwIq0 XqHVVZ6yZEwQcmYJSrh05oxT0pqPxRcyqz TWYceLKkiIZ4xf1BrmMT4a3asxH36NsJkxSy3cfovVYVNo6tsk QUbepFU

find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} +

find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} +

chmod u+x bin/magento

If your web server user is set up to operate as a member of a www-data group, you might additionally need to run one more command in the Magento project directory.

Chown -R :www-data .

You are now ready to install Magento 2 Open Source edition

INSTALLING MAGENTO 2 OPEN SOURCE

The Magento 2 Open Source edition can be installed in one of two ways:

  1. command line
  2. Web Setup Wizard 2.

Using a command line is the quickest and simplest method to install Magento 2 Open Source. Installing Magento 2 Open Source can be done using a specific command.

bin/magento setup:install \

–base-url=http://magento2ce.magemastery.com \

–db-host=localhost \

–db-name=magento \

–db-user=magento \

–db-password=magento \

–admin-firstname=admin \

–admin-lastname=admin \

–admin-email=admin@admin.com \

–admin-user=admin \

–admin-password=admin123 \

–language=en_US \

–currency=USD \

–timezone=America/Chicago \

–use-rewrites=1

Make sure to double-check your installation’s —base-url, —database-name, —database-password, and —database-user, and update them as necessary.

It is necessary to set up a new MySQL database before running the installation command.

WBi6nb0MN3bA2wzcyqO2DtRdsGAfCqnDENko2qgF4M 7aVLEvuIpmUHuU8eeMWts3E pOJY5vyrLFdPBPhPyi9foSdjDr8BpzKcyVIGXIsbal 20WyW3AuUNYRJpmb i rdetYK u7b1JBD0G4sfVY

CREATE DATABASE magento;

Copy the installation command from the Magento project directory, and then run it.

After the installation has gone smoothly, we can get two success messages.

G80m2dYJR8w4rmf84Uz8pQxByR0cKx1VCaRQ 7fi2rcUqfv3gmtO9s5HExHI13A1ix8YsY4K2X9qjFAcJ5zMZCgNvq3STglMIs CzRFapVfrbs3Cc6rmrKXr7Rt3VKBxx

To access Magento Admin, use the URI for Magento.

Additionally, you might need to set up the virtual hosts file for the Apache or Nginx web servers in order to access a local domain and use the Magento 2 Open Source application through a browser.

For reference, the hosts file example using the local domain name is shown below:

SHp6AEDqCOj0wq2tenOdXCs pVNMLArDiokhXFlwHf8mcgD0wNSZP rSOV2DSvZ6elKCPHZTNAeCaGD A8O

127.0.0.1 magento2ce.magemastery.com

And, an Apache 2 httpd-vhosts.conf file:

0FOe ad9puRD5TG0npLQn5qUJDfvibZVjTRzb7CGkHfzFpVVg 5xpaLKbpEdg2ADrva1gzDrUpD LG3mcNmxHUlxHR0fiYt7VCXxJWCsXrxvJa0XSbuO6nq6Wt2hEyUMPvMdDEYtb 9PofnRXarnqmw

<VirtualHost *:80>

    ServerAdmin admin@example.com

    DocumentRoot “/Users/pronko/www/videos/tutorials/project-community-edition”

    ServerName magento2ce.magemastery.com

    ErrorLog “/usr/local/var/log/httpd/magento.com-error_log”

    CustomLog “/usr/local/var/log/httpd/magento.com-access_log” common

</VirtualHost>

Open a browser and go to the address http://magento2ce.magemastery.com. The home page may take some time to load the first time.

c0

You now have a Magento 2 Open Source application that is completely operational. You can see the various features that are accessible right out of the box, and now you’re ready to go down the development road!

At the end of this blog, we now know more about the Magento 2 platform, especially the Open Source version. We have learned about where to locate a Magento Metapackage, Composer Package Manager installation for Magento 2 Open Source, and How to use the browser to access recently installed Magento 2 Open Source. To learn more, feel free to geek around and find out more! <link>

Industry news straight to your inbox

Get the latest commerce news, trends, and strategies to grow your business
Subscribe to the newsletter
By submitting this form, you agree to receive promotional messages from Magstack. Unsubscribe any time by clicking the link in our emails.
Select location and language

Contact Our Sales Team

Learn more about our products, features, and pricing options.
By submitting this form, you agree to receive promotional messages from Shopify about its products and services. You can unsubscribe at any time by clicking on the link at the bottom of our emails.
Product
Pricing
Use cases
Recourses
Documentation
Log in
Start a free trial