2

I installed Magento 2 locally using composer on MAMP. I developed my custom theme and configured the shop in Magento admin. How do I transfer all my configurations to the Staging server?

In Drupal 8 you have Configuration Management. Regarding Magento 2, what are best practices, transferring my configurations from local Dev to Staging server?

  • Interesting question, I'm not sure there is an automated way of migrating configuration. Arguably you should be creating install scripts for setting the configuration in the first place rather than manually editing it. I've not used Drupal 8 so I'm not sure how it works, but it seems to me there are always likely to be a sub-set of options you are going to want to be different between staging and dev (URLs for example). – Peter O'Callaghan Jun 16 '16 at 8:06
0

How do I transfer all my configurations to the Staging server?

You would take a database dump of the core_config_data table from the development server and import it into your staging server database.

On Dev:

mysqldump -uuser -ppassword database_name core_config_data > core_config_data_dev.sql

On Staging

mysql -uuser -ppassword database_name < core_config_data_dev.sql

Clear caches etc.

But as @Peter O'Callaghan commented there will be something you want to change such as url, you can use find and replace to change the main thing which is the url before importing.

Also I agree the best way to handle this is some sort of configuration management such as installers, internally we have a file configuration module which allows you to define system configurations in .yaml and apply via the Magento command, hopefully I will get approval to opensource it at some point.

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.