I have changed Base url in Magento 2.1, but it does not works.
While installing I have set base url to www.domain1.net
. I need to change it to www.domain2.net
.
What I tried:
Update baseurl in
core_config_data
:UPDATE core_config_data SET value = 'http://www.domain2.net/' WHERE path IN ('web/secure/base_url', 'web/unsecure/base_url');
Replace
design/head/includes/
UPDATE core_config_data SET value = REPLACE(value, 'http://www.domain1.net/', 'http://www.domain2.net/') WHERE path = 'design/head/includes';
Then changed Store Url
php bin/magento setup:store-config:set --base-url="http://www.domain2.net/"
php bin/magento setup:store-config:set --base-url-secure="https://www.domain2.net/"
Finally cleared the cache:
php bin/magento cache:flush
After serach www.domain2.net it throw server not found.
Reference:
- https://mage2.pro/t/topic/22
- http://blog.netgloo.com/2016/05/13/magento-2-change-base-url-using-the-command-line/
What is it the right way to change Base url in magento 2.1?
php bin/magento list
it says: setup:store-config:set Installs the store configuration. Deprecated since 2.2.0. Use config:set instead