0

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

Thanks

1

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

https://devdocs.magento.com/guides/v2.3/config-guide/config/config-php.html

like that you "override" the code_config_data value.

it's available since 2.2 and working well.

| improve this answer | |
0

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).

EDIT:

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

| improve this answer | |

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.