Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi commerce guys,
Why if
I choose to install commerce 2 from scratch :
composer create-project
all the files structure modify?
for example :
the vendor folder moves external from the root web folder?
If I will need to upgrade drupal I will be confused what to do....
There is a way to install drupal commerce the classic way? like:
- install commerce module
- install all dependecis modules
- copy the commerceguys library folder
- enable all the internal commerce modules
second:
if i coose to install commerce to exsisting site but without drupal console,
what is the right way to enable commerce sub modules?
thanks a lot.
Comments
Comment #2
bojanz CreditAttribution: bojanz at Centarro commentedThe project-base has an improved folder structure that is more suited for modern websites that are managed by Composer.
For example, the vendor folder is moved above the web root for additional security.
You update Drupal core using "composer update drupal/core --with-dependencies".
No other methods are supported after you install a module via Composer for the first time.
(drupal pm-update will be removed in favor of Composer soon, so that dilemma will soon disappear).
There is no way to manually install Commerce without Composer, because there's no way to manually install a PHP library without Composer. Think of it as mandatory Drush that downloads core, modules, and keeps them up to date.
You are free to use any method (admin/modules, Drush, Console) to enable Commerce, as long as you used Composer to download it.
Comment #3
ntigh52 CreditAttribution: ntigh52 commentedThanks Bojan,
on commerce 1 the order to install commerce from admin console was:
On commerce 2 there is no neccassery order to enable them?
Thanks again.
Comment #4
mglamanThere wasn't really an order in 1.x; Drupal would resolve dependencies. Since there is no decoupled UI module in 2.x, just enable as needed and any prompted dependencies.
Comment #5
ntigh52 CreditAttribution: ntigh52 commentedGreate! Thanks.
So, Just for final understanding,
If I install commerce from scratch, the right way for modern websites is to locate the vendor folder above the web root folder.
But, when adding commerce module to an existing drupal 8 structure, the vendor folder will stay on the web root folder.
Am I right?
Thanks a lot.
Comment #6
mglamanI think your best bet is to give it a try and see.
vendor
outside of the docroot, but the application (Drupal) lives inweb
and can load files. Visit https://github.com/drupalcommerce/project-base, runcomposer create-project drupalcommerce/project-base some-dir --stability dev --no-interaction
and see how it looks.Comment #7
bojanz CreditAttribution: bojanz at Centarro commentedCorrect.
Comment #8
ntigh52 CreditAttribution: ntigh52 commentedThanks a lot Matt,
Thanks a lot Bojan,
Thanks a lot Commerce Guys,