Step 1: verify tools and compatibility
Choose Magento, PHP, Composer, database, and search versions from the current system-requirements matrix. This guide uses placeholders because supported combinations change.
Check DDEV and Docker
Confirms the local container tooling is available before project configuration.
ddev version
docker version
Create and enter the project directory
Creates an isolated directory for Magento and DDEV configuration.
mkdir <project-directory>
cd <project-directory>
Step 2: configure DDEV and the search service
Magento serves public files from pub/. Set a supported PHP version and review the generated .ddev/config.yaml before starting.
Configure the Magento project
Creates DDEV configuration for Magento with its correct document root and media upload directory while the application is being installed.
ddev config --project-type=magento2 --docroot=pub --upload-dirs=media --disable-settings-management --php-version=<supported-php-version>
Add OpenSearch
Adds the maintained OpenSearch service definition to the local project.
ddev add-on get ddev/ddev-opensearch
Start and inspect services
Starts the project and shows local URLs and service details.
ddev start
ddev describe
Step 3: handle Adobe repository credentials
Adobe Commerce Marketplace access keys are secrets. Never publish them, commit auth.json, or leave real keys in a shared command file.
Configure placeholder repository authentication
Stores Adobe repository authentication in the container’s Composer configuration.
ddev composer config --global --auth http-basic.repo.magento.com <public-key> <private-key>
Check Composer configuration
Runs Composer diagnostics without printing the private key in this guide.
ddev composer diagnose
Step 4: download the Magento project
Pick an explicit release after checking current security and compatibility guidance. Do not copy a stale version from an old command note.
Create the Magento codebase
Downloads the requested Magento Open Source release and its locked dependencies into the current directory.
ddev composer create-project --repository https://repo.magento.com/ magento/project-community-edition . "<magento-version>"
Validate dependencies
Checks Composer metadata and confirms that required PHP extensions and versions are present.
ddev composer validate
ddev composer check-platform-reqs
Step 5: install Magento with local-only values
DDEV’s conventional database host, name, user, and password are db, db, db, and db. All store and administrator values below remain placeholders.
Run the Magento installer
Creates the Magento database, store configuration, search connection, and first local administrator.
ddev magento setup:install \
--base-url='https://<project-name>.ddev.site/' \
--db-host=db --db-name=db --db-user=db --db-password=db \
--admin-firstname=<first-name> --admin-lastname=<last-name> \
[email protected] --admin-user=<admin-user> \
--admin-password='<strong-local-password>' \
--language=en_US --currency=USD --timezone=<timezone> \
--use-rewrites=1 \
--search-engine=opensearch --opensearch-host=opensearch --opensearch-port=9200
Step 6: verify the installation
Finish with explicit status checks so a partially working environment is caught immediately.
Enable developer mode locally
Enables developer-oriented error reporting and asset behavior for a local environment.
ddev magento deploy:mode:set developer
Restore DDEV settings management
Allows DDEV to manage Magento’s local environment settings after installation.
ddev config --disable-settings-management=false
Clean, index, and launch
Cleans generated cache state, builds indexes, and opens the local storefront.
ddev magento cache:clean
ddev magento indexer:reindex
ddev launch