Portal Home > Knowledgebase > Magento > How To Change Magento Base Url
The below information will explain how to move a Magento store from one url to another. This is usually done when moving from a development site to a live site.
Step 1: Edit old URL values in database (phpmyadmin)
Table: core_config_data
In this table you need to edit the field named value containing specific values in the field named path!
Precisely saying you need to search for web/unsecure/base_url and web/secure/base_url and replace them with new values.Please refer to the images for an example.
OLD Values:
Step 2: Login to backend and clear Configuration cache!
This might be simply not possible and hence skip to next step!Step 3: Find All entries of old domain name in the cache folder and replace them one by one.
Magento retains all configuration cache in /var/cache folder.
This step is good for Advanced Users who can do file search and replace such strings in one hitYou can use this “Unix Find Command” very useful in searching:
find . -exec grep -q www.magdummy.cws '{}' \; –printStep 3: Now it¢s time to clear the cache! (Normal User)
As already specified in step2, we know that Magento retains all configuration cache in /var/cache folder.
You can clear the entire contents in this cache folder. Magento regenerates all these files when needed.Step4: View your new site in the browser.
It should now be working fine like the old one
Add to Favourites
Print this Article