Magento, Change Domain | HostGator Support
  1. Knowledge Base
  2. >
  3. Results
  4. >
  5. Magento, Change Domain

Magento, Change Domain

 

Warning! Before following the instructions in this article, it is recommended that you make a full backup of your site.

To update the domain name of your Magento installation:

Step 1: How to identify a Magento Database

  1. Log in to cPanel.
  2. Go to the File Manager.

    cPanel - File Manager

  3. Navigate to the Magento website's document root and look for /app/etc/local.xml.
  4. In the list of files, locate /local.xml.
  5. Right-click on the file and select the View option.
  6. Find the line that says <dbname><![CDATA[example_database]]></dbname>. For the example below, we will use knowledg_mgnt2.

Step 2: How to update the domain of the Magento website

  1. Go back to the cPanel homepage.
  2. In the Databases section, click the phpMyAdmin icon.

    HostGator cPanel phpMyAdmin

  3. In the left-hand menu, select your Magento database, which you've located in Step 1. For this example, we will use knowledg_mgt2.

    HostGator cPanel phpMyAdmin Database List

  4. Within the table knowledg_mgt2, locate core_config_data.

    HostGator cPanel phpMyAdmin core_config_data

  5. Once located, you can click core_config_data or put a checkmark on it, then click the Browse link.
  6. Under the path (Config Path) column, look for web/unsecure/base_url and web/secure/base_url. (Currently, the config_id is 6 and 7.)

    HostGator cPanel phpMyAdmin Config Path

  7. Click the pencil icon of each of these rows and change each value with your new domain name.

    HostGator cPanel phpMyAdmin Edit

Additional changes may be required depending on your site configuration if the URLs are located in other database tables. You may also need to empty your /var/cache/ folder before your domain name change occurs.

Still, having difficulty updating the domain name of your Magento installation? Please feel free to contact us via phone or chat to request a quote.