Magento 2 Project Setup
Before writing code
- Fetch system requirements: Fetch
https://experienceleague.adobe.com/en/docs/commerce-operations/installation-guide/system-requirements for current PHP, MySQL, OpenSearch, Redis, and Varnish versions
- Fetch installation guide: Web-search
site:experienceleague.adobe.com commerce installation guide for step-by-step setup
- Check latest version: Web-search
magento open source latest version release for the current GA release
What This Skill Does
Guides through complete Magento 2 environment setup:
- Verify system requirements — PHP version, required extensions, MySQL/MariaDB, OpenSearch, Redis, Composer
- Install via Composer —
composer create-project from repo.magento.com
- Configure services — database, search engine, cache backend, session storage
- Run installer —
bin/magento setup:install with all required parameters
- Post-install — cron setup, developer mode, sample data (optional)
Supported Stack (Conceptual)
- PHP: 8.2+ (check docs for exact supported versions)
- Database: MySQL 8.0+ or MariaDB 10.6+
- Search: OpenSearch 2.12+ (Elasticsearch deprecated)
- Cache/Session: Redis 7.x or Valkey 8.x
- HTTP Cache: Varnish 7.x
- Message Queue: RabbitMQ 3.13+ (optional)
- Web Server: Nginx 1.24+ or Apache 2.4
- Composer: 2.x
Required PHP Extensions
memory_limit >= 2GB, and extensions: bcmath, ctype, curl, dom, gd, hash, iconv, intl, mbstring, openssl, pdo_mysql, simplexml, soap, spl, xsl, zip, sodium, sockets.
Installation Pattern
# 1. Create project
composer create-project --repository-url=https://repo.magento.com/ \
magento/project-community-edition <install-dir>
# 2. Install (with all services configured)
bin/magento setup:install \
--base-url=<url> \
--db-host=<host> --db-name=<name> --db-user=<user> --db-password=<pass> \
--search-engine=opensearch --opensearch-host=<host> --opensearch-port=9200 \
--session-save=redis --session-save-redis-host=<host> \
--cache-backend=redis --cache-backend-redis-server=<host> \
--admin-firstname=<first> --admin-lastname=<last> \
--admin-email=<email> --admin-user=<user> --admin-password=<pass>
# 3. Post-install
bin/magento deploy:mode:set developer
bin/magento cron:install
bin/magento setup:upgrade
bin/magento cache:flush
Development Environment Options
- Docker: Warden, Mark Shust's Docker Config, DDEV
- Local: Native PHP/MySQL/Nginx stack
- Cloud: Adobe Commerce Cloud (paid), custom cloud setup
Fetch the installation guide for exact CLI flags, service configuration, and file permission setup before proceeding.
1---2name: magento-setup3description: Set up a Magento 2 Open Source project — installation, Composer setup, system requirements verification, and initial configuration. Use when starting a new Magento project or setting up a development environment.4---5
6# Magento 2 Project Setup
7
8## Before writing code
9
101. **Fetch system requirements**: Fetch `https://experienceleague.adobe.com/en/docs/commerce-operations/installation-guide/system-requirements` for current PHP, MySQL, OpenSearch, Redis, and Varnish versions
112. **Fetch installation guide**: Web-search `site:experienceleague.adobe.com commerce installation guide` for step-by-step setup
123. **Check latest version**: Web-search `magento open source latest version release` for the current GA release
13
14## What This Skill Does
15
16Guides through complete Magento 2 environment setup:
17
181. **Verify system requirements** — PHP version, required extensions, MySQL/MariaDB, OpenSearch, Redis, Composer
192. **Install via Composer** — `composer create-project` from `repo.magento.com`
203. **Configure services** — database, search engine, cache backend, session storage
214. **Run installer** — `bin/magento setup:install` with all required parameters
225. **Post-install** — cron setup, developer mode, sample data (optional)
23
24## Supported Stack (Conceptual)
25
26- **PHP**: 8.2+ (check docs for exact supported versions)
27- **Database**: MySQL 8.0+ or MariaDB 10.6+
28- **Search**: OpenSearch 2.12+ (Elasticsearch deprecated)
29- **Cache/Session**: Redis 7.x or Valkey 8.x
30- **HTTP Cache**: Varnish 7.x
31- **Message Queue**: RabbitMQ 3.13+ (optional)
32- **Web Server**: Nginx 1.24+ or Apache 2.4
33- **Composer**: 2.x
34
35## Required PHP Extensions
36
37memory_limit >= 2GB, and extensions: bcmath, ctype, curl, dom, gd, hash, iconv, intl, mbstring, openssl, pdo_mysql, simplexml, soap, spl, xsl, zip, sodium, sockets.
38
39## Installation Pattern
40
41```bash
42# 1. Create project
43composer create-project --repository-url=https://repo.magento.com/ \
44 magento/project-community-edition <install-dir>
45
46# 2. Install (with all services configured)
47bin/magento setup:install \
48 --base-url=<url> \
49 --db-host=<host> --db-name=<name> --db-user=<user> --db-password=<pass> \
50 --search-engine=opensearch --opensearch-host=<host> --opensearch-port=9200 \
51 --session-save=redis --session-save-redis-host=<host> \
52 --cache-backend=redis --cache-backend-redis-server=<host> \
53 --admin-firstname=<first> --admin-lastname=<last> \
54 --admin-email=<email> --admin-user=<user> --admin-password=<pass>
55
56# 3. Post-install
57bin/magento deploy:mode:set developer
58bin/magento cron:install
59bin/magento setup:upgrade
60bin/magento cache:flush
61```
62
63## Development Environment Options
64
65- **Docker**: Warden, Mark Shust's Docker Config, DDEV
66- **Local**: Native PHP/MySQL/Nginx stack
67- **Cloud**: Adobe Commerce Cloud (paid), custom cloud setup
68
69Fetch the installation guide for exact CLI flags, service configuration, and file permission setup before proceeding.