The following command will download Drupal 8 + Commerce 2.x with all
dependencies to the
composer create-project drupalcommerce/project-base mystore --stability dev
Navigate to the project directory (which is 'mystore', unless you changed it in the above command).
cd mystore ddev config
Leave the project type set to 'drupal8'.
At this point, you can start up your project environment. However, you may want to first change the http and https ports for your site, which are set to 80 and 443 by default. If these ports are already in use on your machine, you will get the following error message:
Failed to start commerce-docs: Unable to listen on required ports, localhost port 80 is in use, Troubleshooting suggestions at https://ddev.readthedocs.io/en/latest/users/troubleshooting/#unable-listen
To change the ports used by ddev, open the file
.ddev/config.yaml in your
project. Edit the
router_https_port values and save
Start running your project:
When the project successfully starts, you will be given the address for your
new site. For example:
http://mystore.ddev.local:8080. Copy and paste your
site address into a browser.
The first time you access your site, you will be asked for some basic
configuration information. For the database configuration, use
to view your MySQL Credentials:
MySQL Credentials ----------------- Username: db Password: db Database name: db Host: db Port: 3306
Note that you need to open the 'Advanced options' section of the form to
The very first thing you'll want to do to get started with Drupal
Commerce is create a store. Under the Commerce menu in the toolbar,
navigate to Configuration > Store > Stores and click the
Add store button.
Once you've created a store, you'll be able to create products and start
developing the rest of your site.
Found errors? Think you can improve this documentation? edit this page