How to Update Magento Website URL

Changing website link might be necessary if you change your business name or if you bought a new domain name. There are two ways on how to change the Magento URL:  

Via Magento Admin Page 

This process is the easiest and most convenient as it doesn’t need your website hosting access. It only needs your Magento admin logins.  

Note: These steps are only applicable to Magento users with administration access.

Step 1. Access your Magento admin page. Use the same admin URL set up during Magento installation.  

Step 2. Log in using the username and password set up during Magento installation. 

Magento Login Page

Step 3. Perform the Two-Factor Authentication. 

Magento Two Factor Authentication Page

Step 4. Click Stores on the menu bar on the left side of the page. 

Magento Page Store Button

Step 5. Click the Configuration option. 

Magento Page Configuration Tab

Step 6. Click Web under General options. 

Magento Page Web Settings

Step 7. Enter the new website URL in the box provided under Base URLs 

Magento Admin Page Edit BaseURL

Step 8. Enter the new website URL in the box provided under Secure Base URL. 

Magento Page Edit Secure BaseURL

Step 9. Click the Save Config button on the upper right side of the page to save the changes made.  

Magento Page Save Config Button

Try accessing the website with the new URL. The changes should take effect right away. 

Via PhpMyAdmin in cPanel 

This process is applicable if you have access to your cPanel. Follow the steps below on how to change the Magento URL of your Magento website. 

Step 1Log in to cPanel. 

Step 2. Click File Manager. 

Step 3. Go to your Magento website files and locate the env.php file in the file path of app/etc/env.php. 

Step 4. Right click on the file and select Edit. 

Step 5. Click the Edit button. 

Step 6. Scroll down to line 17 and take note of the value indicated on the right of the dbname (database name). 

Magento Website Database Details in Env-php File

Step 7. Go back to cPanel homepage by going back to the previous tab. 

Step 8. Scroll down to the icons under Databases and click phpMyAdmin. 

cPanel phpMyAdmin Button

Step 9. Click the database name that was obtained from Step 6. 

Databases in phpMyAdmin

Step 10Click the table that ends with _core_config_data. The tables on each website can differ in prefix.  

Config Table for Magento in PhpMyAdmin

Step 11. Double-click the value of web/unsecure/base_url to edit the URL in the cell. 

Magento BaseURL Value in PhpMyAdmin

Step 12Enter the new URL of your Magento website. 

Magento Base URL Cell in PhpMyAdmin

Step 13. Click anywhere outside the box to save the changes. A pop-up message shown in the screenshot below will indicate that the update has been saved. 

One Row Affected in PhpMyAdmin

Try accessing the website with the new URL. The changes should take effect right away. 

Do not hesitate to contact our Singapore or Australia Support Team if you have further questions. 

(Visited 284 times, 1 visits today)

Was this article helpful?

Related Articles