tsoHost Help Centre

Table of Contents

Changing Magento base URLs

Updated Oct 31st, 2017 at 12:26 GMT

If you get a new Domain name, or want to publish a development Magento site, you may need to change its base URLs. You can do this either through your Magento admin area, or by manually editing your site's database.

Changing base URLs in the Magento admin area

  1. Log into your Magento admin area
  2. Go to System -> Configuration
  3. On the left-hand side click on Web
  4. In both the Unsecure and Secure drop-downs, locate the Base URL input and change this to your new domain name, including the protocol and trailing slash e.g., https://securedomain.com/ 

Changing base URLs in the database

  1. In your file manager or FTP client, find your database configuration file at /app/etc/local.xml
  2. Find the following lines:
    <connection>
       <host><![CDATA[database_host]]></host>
       <username><![CDATA[database_username]]></username>
       <password><![CDATA[database_password]]></password>
       <dbname><![CDATA[database_name]]></dbname>
       <active>1</active>
    </connection>
  3. Log into phpMyAdmin using the database_username and database_password as above
  4. In phpMyAdmin, locate the database corresponding to database_name as above 
  5. Find the table named core_config_data and click to edit it
  6. In the path column locate the rows containing web/unsecure/base_url and web/secure/base_url
  7. For the rows in step 6, change the value column to the desired domain name, including the protocol and trailing slash e.g., https://securedomain.com/ 

After following either of the above methods, you should then purge your Magento cache for the changes to take effect. Note, you may also need to clear your web browser cache for your browser to pick up the changes.

If you have trouble with any of the above steps, our support team is always on hand to help.