To do so, you’ll require the value of:
Also, do share the post with Magento Community via social media.
- The configuration path
- The scope code
- Log in to your account using SSH.
Never miss Magento tips, tricks, tutorials, and news.
Set Store Wise System Configuration Value:
Moreover, it also provides an excellent feature that allows the developer to set system configuration value using CLI command in Magento 2! You can set Magento 2 default configuration option value as well as third-party extension configuration value from the CLI command.
Method to Set System Configuration Value Using CLI Command in Magento 2
Thank you for subscribing.
I’d be happy to help.
bin/magento config:set [config/path/here] [value]
Set Website Wise System Configuration Value:
bin/magento config:set web/secure/base_url https://domain.com/
Magento 2 CMS provides the powerful command-line interface tool that allows the developers to use default commands that perform tasks including installation, modules, indexes management, database backups-updates, compiling LESS, etc.
bin/magento config:set —scope=websites —scope–code=base web/secure/base_url https://domain.com/
Any doubts about this solution can be mentioned in the Comments section below.
bin/magento config:set —scope=stores —scope–code=default web/secure/base_url https://domain.com/
Pass CLI commands:
For such a scenario, use the below method and validate an appropriate value in the CLI command.
The scope code is needed to set a configuration value for a particular scope, and one can find the configuration path from the ‘core_config_data’ table of the database.
Something went wrong.
Get Weekly Updates
To make this explanation more specific, let’s consider an example.
For instance, the admin panel of Magento 2 is not working or opening for any reason. Somehow you have to change the value of the system configuration. In that case, you have to find out a way that can change or set a system configuration value without opening the admin panel!