How to setup stores and website using config.php file Magento 2?

config.php file in Magento contains the list of installed modules, Website, Store related setup, Locales, and system configuration settings.

You can see the config.php file location at the given path, app/etc/config.php

I will just highlight the Scopes section of the config file.

There will be different sections to be used within the config.php file.h

1. modules (Out of the box modules section contains the List of Modules available.)
2. scopes (This section contains the stores, store groups, and websites related information.)
3. system (This section is used to set system configuration value.)
4. themes (This section is used to setup themes related information.) Continue reading “How to setup stores and website using config.php file Magento 2?”

How to set stores URL configuration by env.php file in magento 2?

Magento env.php file stores  Environment specific configuration and system-related sensitive data.

With the help of the ‘system’ array node, A System node locks the provided configuration values in the env.php file and disables that field in the admin panel.

Sensitive values might be API keys for the connector, Payment related Stuff, Email Addresses, URLs, and Private Contact related information.

We will set the URL value with the env.php file.

You can’t able to modify it from the Stores -> Configuration -> General -> Web -> Base URL field. Continue reading “How to set stores URL configuration by env.php file in magento 2?”

How to get Admin session lifetime value in Magento 2?

Retrieve the admin session lifetime value in Magento 2 using Programmatic way with ConfigInterface.

From Admin Panel, You can get the value from Stores -> Configuration -> Admin -> Security -> Admin Session Lifetime (seconds). Continue reading “How to get Admin session lifetime value in Magento 2?”