Configure the store
Last update: April 17, 2024
- Topics:
- Install
CREATED FOR:
- Experienced
- Admin
- Developer
Before you run this command, you must do the following or you must install the application:
Secure installation
To use Secure Sockets Layer (SSL), also referred to as HTTPS, for both the Admin and the storefront, you must set all of the following parameters:
--use-secure
: Set to1
--base-url-secure
: Set to a secure URL (that is, starting withhttps://
)--use-secure-admin
Set to1
More details about these parameters can be found later in this topic.
Configure the store
Command usage:
bin/magento setup:store-config:set [--<parameter_name>=<value>, ...]
Where the following table defines parameters and values:
Name | Value | Required? |
---|---|---|
--base-url | Base URL to use to access your Admin and storefront in any of the following formats: - http[s]://<host or ip>/<your install dir>/ .Note: The scheme ( http:// or https:// ) and a trailing slash are both required. <your install dir> is the docroot-relative path in which to install the application. Depending on how you set up your web server and virtual hosts, the path might be magento2 or it might be blank.To access the application on localhost, you can use http://127.0.0.1/<your install dir>/ .- {{base_url}} which represents a base URL defined by a virtual host setting or by a virtualization environment like Docker. For example, if you set up a virtual host with the hostname commerce.example.com, you can install the application with --base-url={{base_url}} and access the Admin with a URL like http://commerce.example.com/admin . | No |
--language | Language code to use in the Admin and storefront. (If you have not already done so, you can view the list of language codes by entering magento info:language:list from the bin directory.) | No |
--currency | Default currency to use in the storefront. (If you have not already done so, you can view the list of currencies by entering magento info:currency:list from the bin directory.) | No |
--timezone | Default time zone to use in the Admin and storefront. (If you have not already done so, you can view the list of time zones by entering magento info:timezone:list from the bin directory.) | No |
--use-rewrites | 1 means you use web server rewrites for generated links in the storefront and Admin.0 disables the use of web server rewrites. This is the default. | No |
--use-secure | 1 enables the use of Secure Sockets Layer (SSL) in storefront URLs. Make sure that your web server supports SSL before you select this option.0 disables the use of SSL. In this case, all other secure URL options are assumed to also be 0. This is the default. | No |
--base-url-secure | Secure base URL to use to access your Admin and storefront in the following format: http[s]://<host or ip>/<your install dir>/ | No |
--use-secure-admin | 1 means you use SSL to access the Admin. Make sure that your web server supports SSL before you select this option.0 means you do not use SSL with the Admin. This is the default. | No |
--admin-use-security-key | 1 causes the application to use a randomly generated key value to access pages in the Admin and in forms. These key values help prevent cross-site script forgery attacks. This is the default.0 disables the use of the key. | No |
--magento-init-params | Add to any command to customize application initialization parameters For example: MAGE_MODE=developer&MAGE_DIRS[base][path]=/var/www/example.com&MAGE_DIRS[cache][path]=/var/tmp/cache | No |
Previous pageConfigure the lock provider
Next pageCreate, edit, or unlock admin accounts
Commerce
- Overview
- System requirements
- Prerequisites
- Quick start installation
- Advanced installation
- Post-installation steps
- Tutorials
- Backup and rollback the file system, media, and database
- Check the database status
- Configure message consumer behavior
- Configure the lock provider
- Configure the store
- Create, edit, or unlock admin accounts
- Create or update the deployment configuration
- Create the database schema
- Display or change the Admin URI
- Enable or disable maintenance mode
- Enable or disable modules
- Install an extension
- Install Commerce
- Modify docroot to improve security
- Uninstall language packages
- Uninstall modules
- Uninstall or reinstall Commerce
- Uninstall themes
- Upgrade the database schema
- Return to Operational Guides