Quick Start
Get a Magento project running with MageBox in minutes.
Prerequisites
Before starting, ensure you have:
- MageBox installed (
magebox --version) - Completed bootstrap (
magebox bootstrap) - PHP wrapper in PATH (
which phpshows~/.magebox/bin/php)
Fastest Way: Quick Install
For beginners or quick testing, use the --quick flag:
# Create new store with sensible defaults (no questions asked!)
magebox new mystore --quick
# Start the project
cd mystore && magebox startThen run the Magento installer:
php bin/magento setup:install \
--base-url=https://mystore.test \
--backend-frontname=admin \
--db-host=127.0.0.1:33080 \
--db-name=mystore \
--db-user=root \
--db-password=magebox \
--search-engine=opensearch \
--opensearch-host=127.0.0.1 \
--opensearch-port=9200 \
--opensearch-index-prefix=mystore \
--session-save=redis \
--session-save-redis-host=127.0.0.1 \
--session-save-redis-port=6379 \
--session-save-redis-db=2 \
--cache-backend=redis \
--cache-backend-redis-server=127.0.0.1 \
--cache-backend-redis-port=6379 \
--cache-backend-redis-db=0 \
--page-cache=redis \
--page-cache-redis-server=127.0.0.1 \
--page-cache-redis-port=6379 \
--page-cache-redis-db=1 \
--amqp-host=127.0.0.1 \
--amqp-port=5672 \
--amqp-user=guest \
--amqp-password=guestThat's it! Open https://mystore.test in your browser.
What does --quick install?
The --quick flag installs:
- MageOS (no Adobe authentication required)
- PHP 8.3
- MySQL 8.0
- Redis (cache + sessions) — or use Valkey as alternative
- OpenSearch 2.19 (with ICU and Phonetic plugins)
- RabbitMQ
- Mailpit
- Sample data included
Quick Install with Hyvä Theme
Add the --hyva flag to install the Hyvä theme automatically:
magebox new mystore --quick --hyvaYou'll be prompted for your Hyvä Composer credentials (one-time setup). MageBox handles the rest: installing the theme package, running setup:upgrade, and activating the theme.
See the Hyvä Theme guide for details.
Interactive Wizard
For full control over your setup:
magebox new mystoreThe wizard guides you through:
- Distribution - Magento Open Source or MageOS
- Version - 2.4.7-p3, 2.4.6-p7, etc.
- PHP Version - Shows compatible versions only
- Composer Auth - Marketplace keys (Magento) or skip (MageOS)
- Database - MySQL 8.0/8.4 or MariaDB 10.6/11.4
- Search Engine - OpenSearch, Elasticsearch, or none
- Services - Redis/Valkey, RabbitMQ, Mailpit
- Sample Data - Optional demo products
- Project Details - Name and domain
Existing Project
If you have an existing Magento project:
# Navigate to your project
cd /path/to/magento
# Initialize MageBox
magebox init
# Start the environment
magebox startYour site is now available at https://yourproject.test
Configuration
The magebox init or magebox new commands create a .magebox.yaml file:
name: mystore
domains:
- host: mystore.test
root: pub
ssl: true
php: "8.3"
services:
mysql: "8.0"
redis: true
opensearch:
version: "2.19"
memory: "1g"
rabbitmq: true
mailpit: trueEdit this file to customize your environment.
Common Commands
# Start project
magebox start
# Stop project
magebox stop
# Check status
magebox status
# Run Magento CLI (uses correct PHP automatically)
php bin/magento cache:flush
# Open shell with correct PHP
magebox shell
# View logs
magebox logs
# Import database
magebox db import dump.sql
# Export database
magebox db export backup.sqlAccessing Services
After starting, your services are available at:
Database Connection
The PHP wrapper ensures the correct PHP version is used automatically. Database connection details:
| Property | Value |
|---|---|
| Host | 127.0.0.1 |
| Port | 33080 (MySQL 8.0) |
| Database | mystore |
| Username | root |
| Password | magebox |
Use the database shell:
magebox db shellMultiple Projects
You can run multiple projects simultaneously:
# Project 1
cd /path/to/store1
magebox start
# Project 2 (different terminal)
cd /path/to/store2
magebox start
# List all projects
magebox listEach project uses its own PHP version and services.
Troubleshooting
Site not loading?
Check if services are running:
bashmagebox statusVerify DNS resolution:
bashping mystore.testCheck Nginx configuration:
bashnginx -t
Database connection failed?
Verify Docker containers are running:
bashdocker psCheck the correct port in your config:
bashmagebox status
PHP errors?
Check PHP-FPM logs:
bashmagebox logsVerify PHP version:
bashphp -v
Next Steps
- Project Configuration - Detailed config options
- PHP INI Settings - Customize PHP settings per project
- Services - Configure MySQL, Redis/Valkey, etc.
- Custom Commands - Define project shortcuts
- PHP Version Wrapper - How automatic PHP switching works