@@ -50,55 +50,69 @@ To set a configuration value, you must know at least one of the following:
50
50
51
51
See the following references:
52
52
53
- * [ Sensitive and system-specific configuration paths reference] ({{ page.baseurl }}/config-guide/prod/config-reference-sens.html)
54
- * [ Payment configuration paths reference] ({{ page.baseurl }}/config-guide/prod/config-reference-payment.html)
55
- * [ Other configuration paths reference] ({{ page.baseurl }}/config-guide/prod/config-reference-most.html)
56
- * [ Magento Enterprise B2B Extension configuration paths reference] ({{ page.baseurl }}/config-guide/prod/config-reference-b2b.html)
53
+ * [ Sensitive and system-specific configuration paths reference] ({{ page.baseurl }}/config-guide/prod/config-reference-sens.html)
54
+ * [ Payment configuration paths reference] ({{ page.baseurl }}/config-guide/prod/config-reference-payment.html)
55
+ * [ Other configuration paths reference] ({{ page.baseurl }}/config-guide/prod/config-reference-most.html)
56
+ * [ Magento Enterprise B2B Extension configuration paths reference] ({{ page.baseurl }}/config-guide/prod/config-reference-b2b.html)
57
57
58
58
### Find the scope code
59
59
60
60
You can find the scope code either in the Magento database or in the Magento [ Admin] ( https://glossary.magento.com/admin ) . See one of the following sections for more information.
61
61
62
62
#### Find the scope code in the Admin
63
63
64
- 1 . Log into Admin as a user who can view websites and store views.
65
- 2 . Click ** Stores** > ** Settings** > ** All Stores** .
66
- 3 . In the right pane, click the name of the website or store view to see its code.
64
+ 1 . Log into Admin as a user who can view websites and store views.
65
+ 1 . Click ** Stores** > ** Settings** > ** All Stores** .
66
+ 1 . In the right pane, click the name of the website or store view to see its code.
67
67
68
- The following figure shows a sample website code.
68
+ The following figure shows a sample website code.
69
69
70
- ![ Get a website or store view code from the Admin] ({{ site.baseurl }}/common/images/config_configset_website-code.png){: width ="450px"}
71
- 4 . Continue with [ Set configuration values] ( #config-cli-config-set ) .
70
+ ![ Get a website or store view code from the Admin] ({{ site.baseurl }}/common/images/config_configset_website-code.png){: width ="450px"}
71
+
72
+ 1 . Continue with [ Set configuration values] ( #config-cli-config-set ) .
72
73
73
74
#### Find the scope code in the database
74
75
75
76
Scope codes for websites and store views are stored in the Magento database in the ` store_website ` and ` store ` tables, respectively.
76
77
77
78
To find the values in the database:
78
79
79
- 1 . Connect to the Magento database:
80
+ 1 . Connect to the Magento database:
81
+
82
+ ``` bash
83
+ mysql -u < magento database username> -p
84
+ ```
80
85
81
- mysql -u <magento database username> -p
82
- 2 . Enter the following commands:
86
+ 1 . Enter the following commands:
83
87
84
- use <magento database name>;
85
- SELECT * FROM store ;
86
- SELECT * FROM store_website;
88
+ ``` shell
89
+ use < magento database name > ;
90
+ ```
87
91
88
- A sample result follows:
92
+ ``` shell
93
+ SELECT * FROM store;
94
+ ```
89
95
90
- [mysql]> SELECT * FROM store_website;
91
- +------------+-------+--------------+------------+------------------+------------+
92
- | website_id | code | name | sort_order | default_group_id | is_default |
93
- +------------+-------+--------------+------------+------------------+------------+
94
- | 0 | admin | Admin | 0 | 0 | 0 |
95
- | 1 | base | Main Website | 0 | 1 | 1 |
96
- | 2 | test1 | Test Website | 0 | 3 | 0 |
97
- +------------+-------+--------------+------------+------------------+------------+
96
+ ``` shell
97
+ SELECT * FROM store_website;
98
+ ```
98
99
99
- Use the value in the ` code ` column.
100
+ A sample result follows:
100
101
101
- 3 . Continue with the next section.
102
+ ``` terminal
103
+ [mysql]> SELECT * FROM store_website;
104
+ +------------+-------+--------------+------------+------------------+------------+
105
+ | website_id | code | name | sort_order | default_group_id | is_default |
106
+ +------------+-------+--------------+------------+------------------+------------+
107
+ | 0 | admin | Admin | 0 | 0 | 0 |
108
+ | 1 | base | Main Website | 0 | 1 | 1 |
109
+ | 2 | test1 | Test Website | 0 | 3 | 0 |
110
+ +------------+-------+--------------+------------+------------------+------------+
111
+ ```
112
+
113
+ Use the value in the ` code ` column.
114
+
115
+ 1 . Continue with the next section.
102
116
103
117
## Set configuration values {#config-cli-config-set}
104
118
@@ -107,6 +121,7 @@ To set system-specific configuration values on Magento 2.2.0 - 2.2.3, use:
107
121
``` bash
108
122
bin/magento config:set [--scope= " ..." ] [--scope-code= " ..." ] [-l | --lock] path value
109
123
```
124
+
110
125
To set system-specific configuration values on Magento 2.2.4 and higher (on the 2.2 branch), use:
111
126
112
127
``` bash
@@ -136,12 +151,14 @@ If you use the `--lock`, `--lock-env`, or `--lock-config` option to set or chang
136
151
137
152
If you enter an incorrect configuration path, this command returns an error:
138
153
139
- The "wrong/config/path" does not exist
154
+ ``` terminal
155
+ The "wrong/config/path" does not exist
156
+ ```
140
157
141
158
See one of the following sections for more information:
142
159
143
- * [ Set configuration values that can be edited in the Magento Admin] ( #config-cli-config-set-edit )
144
- * [ Set configuration values that cannot be edited in the Magento Admin] ( #config-cli-config-file )
160
+ * [ Set configuration values that can be edited in the Magento Admin] ( #config-cli-config-set-edit )
161
+ * [ Set configuration values that cannot be edited in the Magento Admin] ( #config-cli-config-file )
145
162
146
163
### Set configuration values that can be edited in the Magento Admin {#config-cli-config-set-edit}
147
164
@@ -201,9 +218,9 @@ bin/magento config:show [--scope[="..."]] [--scope-code[="..."]] path
201
218
202
219
In this case:
203
220
204
- * ` --scope` is the scope of configuration (` default` , ` website` , ` store` ). The default value is ` default` .
205
- * ` --scope-code` is the scope code of configuration (website code or store view code).
206
- * ` path` is the configuration path in format ` first_part/second_part/third_part/etc` * (required)* .
221
+ * ` --scope` is the scope of configuration (` default` , ` website` , ` store` ). The default value is ` default` .
222
+ * ` --scope-code` is the scope code of configuration (website code or store view code).
223
+ * ` path` is the configuration path in format ` first_part/second_part/third_part/etc` * (required)* .
207
224
208
225
{:.bs-callout .bs-callout-info}
209
226
The ` bin/magento config:show` command displays the values of any [encrypted values]({{ page.baseurl }}/config-guide/prod/config-reference-sens.html) as a series of asterisks: ` ****** ` .
0 commit comments