Change Magento hostname

First run the following MySQL queries:

UPDATE core_config_data SET `value` = 'http://www.newdomain.nl/' WHERE core_config_data.path = 'web/unsecure/base_url';
UPDATE core_config_data SET `value` = 'https://www.newdomain.nl/' WHERE core_config_data.path = 'web/secure/base_url';
UPDATE core_config_data SET `value` = 'http://www.newdomain.nl/' WHERE core_config_data.path = 'web/unsecure/base_link_url';
UPDATE core_config_data SET `value` = 'https://www.newdomain.nl/' WHERE core_config_data.path = 'web/secure/base_link_url';
UPDATE core_config_data SET `value` = 'www.newdomain.nl' WHERE core_config_data.path = 'web/cookie/cookie_domain';

After that flush the Magento cache:

cd /var/www/domain.com/web && php7.2 bin/magento cache:flush;
Share on facebook
Share on google
Share on twitter
Share on linkedin
Share on whatsapp