Skip to content
Tutorials Center
My learning

Topics

Lesson 1 of 42 ยท Getting Started

What Magento Is and Where It Fits

Learn what Magento 2 is, how Magento Open Source differs from Adobe Commerce, what you configure versus customise, and how these lessons teach with safe stand-ins.

Magento is an e-commerce platform written in PHP. It gives you a catalog, a shopping cart, checkout, customer accounts, an admin panel, order management, promotions, tax and shipping rules, and APIs, all as one application you host yourself or on a managed cloud. Large stores with complicated catalogs, many store views, several currencies and custom business rules are where Magento is strongest. It is also a framework: almost everything in it is built from small modules that you can add, replace or extend.

That second point is why this track exists. Most Magento jobs are not about installing the software, they are about extending it without editing its code. A client wants a surcharge on one shipping method, a new product attribute, a nightly export to an ERP, or a REST endpoint for a mobile app. Magento gives you well-defined extension points for each of these: modules, dependency injection configuration, plugins, observers, layout XML, declarative schema and more. You will learn them in order, and each lesson ends with something you can run.

This first lesson explains the product, the two editions, what "customising" means in Magento, how version numbers work, and how the lessons are organised. Plain PHP knowledge is assumed, so if classes, interfaces and namespaces are new to you, start with Classes and Objects, Namespaces and Autoloading and Composer.

Magento Open Source and Adobe Commerce

Two editions share one code base:

  • Magento Open Source is the free edition. You download it with Composer, host it yourself, and you get the full core storefront, catalog, checkout, admin and APIs.
  • Adobe Commerce is the paid edition sold by Adobe. It builds on the same core and adds commercial features and services, and it is also offered as a managed cloud product. Exactly which features and services are included changes between releases, so check Adobe's current edition comparison before making a purchasing decision.

For a developer the important fact is that the extension model is the same. A module you write for Open Source uses the same registration files, the same di.xml, the same plugins and the same layout system on Adobe Commerce. The lessons in this track therefore teach the shared core, and they say so when something is specific to one edition.

You will see both names in job ads and documentation. Older material also says "Magento 2" for the whole 2.x line. The first Magento (version 1) is end-of-life and is not covered here.

Configure first, customise second

A common beginner mistake is to open PHP files when a setting would do. Magento has three levels of change, and you should always pick the lowest one that works:

  1. Configuration: values in the admin panel under Stores > Configuration, plus catalog data such as products and categories, CMS pages and price rules. No code, and it can be changed by a merchant.
  2. Declarative customisation: you add files to a module that describe a change, for example a layout XML file that moves a block, a di.xml entry that swaps a class, or a system.xml file that adds a new admin setting.
  3. Code customisation: you write PHP classes such as a plugin, an observer, a controller or a repository.

The golden rule is that you never edit anything under vendor/. That folder belongs to Composer, and your edits would vanish the next time you upgrade. Instead, your code lives in your own module and hooks into the core.

PHP Configure versus customise

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with fgets(STDIN)), it gets the next line from this box.

In real Magento the wrapping would be a plugin or a di.xml preference, which you will meet in Preferences and Interfaces and Plugins. The idea is already visible, though: the core calculator is never modified.

What a Magento project looks like

A typical project has these moving parts:

flowchart LR
    B["Browser or API client"] --> W["Web server<br/>(nginx or Apache)"]
    W --> P["PHP-FPM running Magento"]
    P --> D["MySQL or MariaDB<br/>(catalog, orders, customers)"]
    P --> S["OpenSearch<br/>(catalog search)"]
    P --> R["Redis<br/>(cache and sessions, optional)"]
    P --> Q["Message queue and cron<br/>(background work)"]

A Magento store is a PHP application with a database, a search engine, optional caches and background workers around it.

You will set this up in Setting Up a Development Environment. For now remember that search is not optional in Magento 2.4: the storefront catalog search needs a search engine service.

Versions and releases

Magento 2 releases are numbered 2.4.x. A release such as 2.4.7 brings new features and supported dependency versions. Security and quality patch releases are tagged with a -p suffix, for example 2.4.7-p3, and a release line stays supported with these patches for a limited time. Each release states which PHP, database and search engine versions it supports, and this changes from one release to the next, so always read the requirements page of the exact version you install.

Because version strings like 2.4.7-p3 are not plain numbers, comparisons need care. PHP's version_compare() understands the p suffix as a "patch level" marker, which is handy in deployment scripts:

PHP Comparing Magento version strings

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with fgets(STDIN)), it gets the next line from this box.

Treat a patch release like a security update, not an optional upgrade. Deployment and Upgrades covers how to roll them out safely.

How these lessons work

Magento is a large application that needs a database, a search engine and a web server, and our in-browser runner offers none of these. We handle that honestly:

  • Real Magento code is read-only. PHP classes, module.xml, di.xml, layout files and CLI commands appear in plain code blocks that you can copy into a real project but not run here.
  • Runnable stand-ins teach the mechanism. Each lesson also has live examples in plain PHP: a tiny object manager, a plugin chain, an event manager, a mini EAV store on SQLite, a layout processor. They are simplified on purpose and each lesson says what is real Magento and what is the stand-in.
  • Everything targets Magento 2.4.x, and version-specific details are kept conservative. When something differs between releases, you are told to check the release notes.

The track climbs from the project layout and modules, through dependency injection, plugins and events, requests and templates, the database layer, backend services like REST, cron and CLI, to caching, testing and deployment. Four projects and a practice section at the end tie everything together.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. What is the main difference for a module developer between Magento Open Source and Adobe Commerce?

    Both editions share the same core and extension points (modules, di.xml, plugins, layout). Adobe Commerce adds paid features and services on top.
  2. 2. A merchant wants to change a setting that already has a field in Stores > Configuration. What should you do?

    Configuration is the lowest and safest level of change. Reach for code only when configuration and declarative files cannot do the job.
  3. 3. Why should you never edit files under vendor/?

    vendor/ is managed by Composer. Put your own code in a module and hook into the core with plugins, observers, preferences or layout XML.
  4. 4. What does the -p3 in 2.4.7-p3 mean?

    The -p suffix marks patch releases that carry security and quality fixes for a release line.

Summary

  • Magento is an e-commerce platform and a modular PHP framework; Open Source and Adobe Commerce share the same extension model.
  • Prefer configuration, then declarative files, then PHP code, and never edit vendor/.
  • A store needs PHP, a database, a search engine, and optionally Redis, queues and cron.
  • Releases are 2.4.x with -pN patch releases; read the requirements of your exact version.
  • In this track real code is read-only and each lesson has runnable plain-PHP stand-ins, clearly labelled.

Next: Architecture and Directory Layout