PHPackages                             space48/magento2-environment-configuration - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. space48/magento2-environment-configuration

ActiveLibrary[CLI &amp; Console](/categories/cli)

space48/magento2-environment-configuration
==========================================

Console command to set Magento configuration for a specified environment

1.3.1(4y ago)93.6k1MITPHP

Since Jan 5Pushed 4y ago24 watchersCompare

[ Source](https://github.com/Space48/magento2-environment-configuration)[ Packagist](https://packagist.org/packages/space48/magento2-environment-configuration)[ RSS](/packages/space48-magento2-environment-configuration/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (9)Dependencies (2)Versions (12)Used By (0)

Magento 2 Environment Configuration
===================================

[](#magento-2-environment-configuration)

No frills PHP configuration for Magento 2.

This package is intended mostly for use by developers and your setup may not need it, please consult the Magento 2 documentation  before using.

Different environments need different configuration and the words used to describe an environment tends to stay the same across different magento code bases ('production', 'staging', etc..) using these words we can store these values in the code and set them with a single command either during a deployment or when setting up a project for the first time.

Please note that the configuration values to be stored and consumed by this module are for convenience and shouldn't be used for handling passwords, keys or anything of a sensitive nature. If you need to store such things, either do it manually or use `env.php` or an environment variable.

Installation
============

[](#installation)

```
composer require space48/magento2-environment-configuration
php bin/magento module:enable Space48_EnvironmentConfiguration
```

Usage
=====

[](#usage)

Day to day usage simply means running the command:

```
php bin/magento environment-configuration:apply local|development|staging|production
```

When setting up the package or adding new config values edit or create a file at `app/etc/environment-configuration.php` that looks like this:

```
