How to configure Magento to work with a new domain or change its directory
There are two ways to change the domain on your Magento application:
For Magento 1.9.x and older:
Access your Magento's admin dashboard and modify the base URLs under:
System -> Configuration -> Web (Under the General section) -> Unsecure
System -> Configuration -> Web (Under the General section) -> Secure
Make sure that you change the "Base URL" to match your new domain.
Clear the Magento cache (System -> Cache Management -> Flush Cache Storage) and test your website.
For Magento 2.x and newer:
Login to your Magento admin area and navigate to:
Stores -> Configuration -> General -> Web -> Base URLs
Stores -> Configuration -> General -> Web -> Base URLs (secure)
Modify the base url input boxes and with your new domain and click on Save Config.
The last step is to clear the cache of your Magento, under System -> Cache Management -> Flush Magento Cache.
The process is applicable for both Magento 1.x and 2.x versions.
Access your phpMyAdmin, navigate to your database and find the core_config_data table.
Click the Browse tab and edit these two fields:
The last thing you need to do is clear the cache of your Magento. More on that can be found in this article.
You find this article useful? Click here to learn more about SiteGround web hosting experts and what else we can do for you!