I am coming from Wordpress and the way I sync my database there is by using a plugin to pull and push databases between too environments, and I was wondering if there is a similar approach with Magento 2 if not than what is the best way?

Also I want to know what are they tables that I need to change once I pushed or pulled a database. From what I can see I only need to change the links on core_config_data



There is a synchronisation tool available on Github that automatically configures your development environment for you



You can also configure env.php locally to use your "local" domain name & db connection in app/etc/env.php


like that you "override" the code_config_data value.

it's available since 2.2 and working well.


The easiest way to achieve what you are after to is to export/copy the latest database and then import it to the old database, this way all your data will be up to date.

You are also correct in saying the only thing that needs to change is in the core_config_data table, the these are the 2 fields relating to the base url (secure & unsecure).


SELECT * from core_config_data WHERE path = 'web/unsecure/base_url';

SELECT * from core_config_data WHERE path = 'web/secure/base_url';

Run these commands to find the urls you require and make changes accordingly

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.