5

We want switch to an integration system with our Magento installations. But I do not know how to export/import settings for deployment process.

I know in Drupal you use modules like Features and Strongarm, is there something similar in Magento?

Because we do not want change any settings in our live environment.

I found MageSetup, but I do not think that is exactly what I am looking for.

And I found this and this - can I address any config, that I can setup in admin panel, this way? Actually I do not want just override the config. I want safe it and when I go to admin panel, I want see there the new setting.

Is there such a feature in Magento 2?

2 Answers 2

4

Adding a late answer here to catch this post up to the current state of the times for the benefit of future Internet wanderers who find this.

As Haijerome wrote, for a long time there was no mechanism for selective configuration import or export built into Magento. This changed with Magento 2.2, when this ability was added to core. Now there is a CLI interface to dump/reload configuration to/from a file that can be versioned alongside the code. There is also the ability to lock certain configuration values to be controlled only in the file configuration and not in the database.

For those on earlier versions of Magento, there are some tools that can be used:

  • Magento 1: Haijerome mentioned the Magerun tool which allows stripped database exports. On its own this doesn't allow selective configuration import/export; however that can be achieved by using the Magerun addon HarrisStreet-ImpEx by Cyrill Schumacher, which allows import and export of configuration values to a variety of formats, including YAML, JSON and XML.
  • Magento 2.0-2.1: For these versions you can use Magento2-ConfigImportExport by Rouven Rieker that allows import and export of configuration values to YAML and JSON. This module plugs into the Magento 2 CLI, so it does not depend on Magerun.
3

You can export (save) the database table core_config_data which holds all your store configurations. This feature is not available either in Magento 1.x versions or in Magento 2 (atleast not in version 2.0.2). By default Magento provides an option only to export the whole database along with the entire magento installation (folders and files) which can be restored (in a sense to make the backup and restore easy when we switch between hosting , though most people prefer to do it through Shell).

You can use a module / command line utility tool n98-magerun which helps you to export only the respective tables (Stripped-Database-Dumps) from the Magento database by create a group of tables to be exported. So using this you easily export all your configurations safely.

Kindly find the link below for more details

https://github.com/netz98/n98-magerun/wiki/Stripped-Database-Dumps

1
  • Thank you. But that means there is no common way to import just some configs in a deployment? But well - since everything is in database, we'd have to write a config updater that runs once per deployment, correct?
    – Jurik
    Mar 15, 2016 at 7:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.