Magento, Change Domain
To update the domain name of your Magento installation:
Step 1: How to identify a Magento Database
- Log in to cPanel.
- Go to the File Manager.
- Navigate to the Magento website's document root and look for /app/etc/local.xml.
- In the list of files, locate /local.xml.
- Right-click on the file and select the View option.
- 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
- Go back to the cPanel homepage.
- In the Databases section, click the phpMyAdmin icon.
- In the left-hand menu, select your Magento database, which you've located in Step 1. For this example, we will use knowledg_mgt2.
- Within the table knowledg_mgt2, locate core_config_data.
- Once located, you can click core_config_data or put a checkmark on it, then click the Browse link.
- 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.)
- Click the pencil icon of each of these rows and change each value with your new domain name.
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.