Store Configuration in Magento 2

The default configurations for your store are stored in a config.xml file for the appropriate module. When you change settings in the Admin or using the CLI bin/magento config:set command, the changes are stored in the core_config_data table. These values override the defaults from config.xml.

Configuration Files Overview

  • app/etc/config.php — Stores configurations for modules, stores, websites, static optimization, etc.
  • app/etc/env.php — Contains sensitive and environment-specific settings (not for version control).

Understanding Scope Levels

  • Global Scope
  • Website Scope
  • Store Scope
  • Store View Scope

Global Website in Magento

A Global Website is the top-level structure for all stores inside a Magento installation. It controls:

  • Default language
  • Default currency
  • Global customer groups
  • All shared configurations

Website View in Magento 2

Website views allow different language and regional customisations of the site:

  • Localized translations
  • Different pricing or inventory
  • Different themes
  • Regional tax settings

Store View in Magento 2

Store views represent the smallest unit of presentation:

  • Multi-language support
  • Localized product data
  • Different URL structures

Use System Value

The Use System Value checkbox allows inheritance from parent scope. If unchecked, you can override for the current scope.

Setting the Configuration Scope

Before adjusting configuration values, select the correct scope in:

Stores → Settings → Configuration

Command Snippets

php bin/magento config:set web/unsecure/base_url http://example.com/
php bin/magento cache:flush

Creating Websites, Stores, and Store Views

Step 1: Create Root Categories

Go to: Catalog → Categories

Step 2: Create Websites

Go to: Stores → Settings → All Stores → Create Website

Step 3: Create Stores

Go to: Stores → Settings → All Stores → Create Store

Step 4: Create Store Views

Go to: Stores → Settings → All Stores → Create Store View

Step 5: Change Website Base URL

Stores → Configuration → General → Web

Step 6: Add Store Code to URL

Enable in: General → Web → Url Options

Step 7: Change Default Store View Base URL

Change from Default Config scope.

Conclusion

Magento 2 store configuration allows merchants to customize every aspect of the store — from URLs, languages, websites, store views, and pricing to customer experience and localization. Its multi-store architecture provides unmatched flexibility and scalability.