Installing Commerce to contribute back? Check out our Getting ready for development guide.
Be sure to review requirements before starting the installation process.
The following command will download Drupal 8 + Commerce 2.x with all
dependencies to the mystore
folder:
composer create-project drupalcommerce/project-base mystore --stability dev
Install it just like a regular Drupal site. Commerce will be automatically enabled for you.
Tips:
bin
folder contains any library binaries, such as Drupal Console, PHPUnit, Behat, etc.web
folder represents the document root.
web
, these instructions describe how you can relocate the docroot.mystore
in this case).Run these commands in the root of your website:
This will also download the required libraries and modules (Address, Entity, State Machine, Inline Entity Form, Profile).
cd /path/to/drupal8
composer require "drupal/commerce"
The instructions below use Drupal Console
drupal module:install commerce_product commerce_checkout commerce_cart
Composer is the recommended way to install and maintain a site. Site administrators using Ludwig need to be careful when combining modules that depend on external libraries, since there are no safeguards against incompatible library versions or overlapping requirements.
These instructions assume you are working with an existing site. See the Drupal.org documentation on Installing Drupal 8 if you do not have an existing site.
Download and install the Ludwig module.
Download Commerce and the following 6 required modules. Do not install the modules yet.
admin/reports/packages
provides a download link for each missing library along with the paths where they should be placed.Download the libraries, then clear the cache to make them available. For example, download commerceguys/addressing and place it in modules/contrib/address/lib/commerceguys-addressing/v1.0.0
. You should see the STATUS for each required package change from "Missing" to "Installed". Alternatively, if you are comfortable with the command line, you can use Drupal Console or Drush commands.
Drupal Console
Drush
Whenever Commerce needs to be updated, all 7 modules need to be downloaded again, and then all of their libraries need to be downloaded again as well.
In subsequent sections of the Installation and updates documentation, it is assumed that you are using Composer to manage your site.
Found errors? Think you can improve this documentation?
edit this page