If you are migrating magento installation to a new domain or IP you have to update those information trought database at the first time.
SELECT * FROM `core_config_data` WHERE `path` LIKE '%base_url%'
reference: https://magento.stackexchange.com/questions/151597/magento-moving-from-ip-address-to-domain-name