How do I change Magento Base URL?

Article ID #1008
Revision: 1.8
Last update: 2013-01-20

Magento Base URL is the URL used to access Store pages. You can set it on a per Store basis.

It can be changed in Magento backend or with phpMyAdmin or direct SQL query.


Before starting the changes please make sure that the domain you wish to use as a Base URL is already resolving to the IP-address of your Store (so either domain's DNS servers or IP-address were set to Magenting's servers).

To verify that DNS changes are completed, you can open the domain name in your browser, it should open your Magento store.


To change Magento Base URL you need to switch to Magento Admin Area and modify the Base URL option at System > Configuration > Web > Unsecure > Base URL  and System > Configuration > Web > Secure > Base URL.

Change Magento Base URL


After that you need to flush cached Magento data at System > Cache Management.


Changing Base URL when Magento backend is inaccessible

If you can not access Magento Admin area due to recent incorrect Base URL changes, you may need to rollback the Base URL changes directly in database. In this case, please use the following instructions:


  • Enable phpMyAdmin access
  • Login to phpMyAdmin, navigate to the core_config_data table, and change the values of the fields with 'web/unsecure/base_url' and 'web/secure/base_url' path:

phpmyadmin -magento change base url



Did this article help you solve your issue?

Average rating: 4.04 (202 votes)

completely useless 1 2 3 4 5 most valuable