This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.
There is no license information available for the latest version (v1.0.0) of this package.

Magento2 Command-Line Tools For Staging Support

v1.0.0 2016-03-02 08:25 UTC

This package is not auto-updated.

Last update: 2021-11-21 23:16:08 UTC


A Magento2 setup for a well structured development process needs the setup of development, integration and production environments.

While staging the database from production server to integration with help of backup console command (bin/magento setup:backup) minor repeating problems occur: Some settings defined in database have to be changed on staging, for example 'web/secure/base_url'.

In order to avoid this repeating task, it should be possible to define different config files overriding this settings in database. That is the purpose of this module.


Add the module to your composer file.

  "require": {    
    "shockwavemk/magento2-module-console-staging": "dev-master"

Install the module with composer

    composer update

On succeed, install the module via bin/magento console:

    bin/magento cache:clean
    bin/magento module:install Shockwavemk_Staging
    bin/magento setup:upgrade

You should be able to see a new command in bin/magento console:


Create configuration file

Create a configuration php file in your project directory (or a subfolder or elsewhere on your server)

    return array (
        'default' =>
                '0' => array(
                    'web/unsecure/base_url' => '',
                    'web/secure/base_url' => ''

Execute command


    < project-path >/bin/magento staging:config:set ./db-config.php

Result in database

Save current db config to file (export)

    < project-path >/bin/magento staging:config:get ./db-config.php