How to move Magento 2 root URL to another domain

Magento 2 Development

To move Magento 2 root URL to another domain, you have to perform a procedure that is similar to one available in Magento 1.x. Note that Magento 2 has the similar to Magento 1 stores shop root URL available in the core_config_data database table. Furthermore, record paths are the same: web/unsecure/base_url and web/secure/base_url. Consequently, you it is possible to change root URL by SQL query:

It is enough for Magento 1, but Magento 2 stores root URL in the third path: design/head/includes

As a result, the record looks as follows:

Therefore, there is a necessity to utilaze an additional SQL query:

Check the following example:

Don’t forget to clear cache:

Source

More tips from Magento 2 cookbook