mage add store
Create a store view with its own domain.
mage add store luma # luma.<your domain>, such as luma.my-shop.test
mage add store b2b.example.test # a full domain
Without an argument it asks for the prefix or domain.
Steps
- Derives the store code from the first part of the domain, dashes become underscores. A code must start with a letter and hold letters, numbers and underscores.
- Creates the store view in the default store group of the default website, unless the code exists.
- Sets its base urls, with the protocol of the main store.
- Makes the domain reachable, depending on the environment.
- Reindexes the design config grid and cleans the cache.
Environments
- Valet: adds the site to
.valet-env.phpwith its store code, then links and secures it. The site name is the domain without the Valet tld, soluma.my-shop.testbecomes the siteluma.my-shop. - Warden: signs the certificate, and tells you to route the domain in
.warden/warden-env.ymland map it inapp/etc/stores.php, see multiple domains. - DDEV: tells you to add the domain to the
additional_fqdnsoradditional_hostnamesof.ddev/config.yamland map it to the store code. - Local: tells you to point the domain to the project in your web server, with the store code as
MAGE_RUN_CODE.