Introduction
There are a number of reasons you might want to change the domain name that your Magento 1 site runs under. The most common reason being in moving from a development domain to a live domain, but that’s not the only reason. Many people find it a lot less painful to convert an existing (working!) Magento to a completely different setup and product range rather than starting from scratch, so you can find this guide useful when duplicating your live domain in order to re-tool it as a new site.
Before you start
Ensure you have backed up your site using Plesk’s Backup Manager tool. This method is robust and we have been using it for several years, but failure to follow it fully can have far reaching implications. If you’re unsure how to take a backup this way, please see our guide here.
You should also ensure that you have access to repoint DNS for your new domain name so that it points to the server and your site is still accessible after the change. You should also consider whether you have any email accounts on the live site that will be affected by the change. If you’re unsure of the DNS changes you’ll need or if you’d just like some reassurance on the changes you’ll need to make, please contact our Support team.
Changing your Magento 1 store's domain name
Log into your Plesk Control Panel and change the domain name using the Hosting Settings menu for your domain. Simply edit the very first text box, deleting the old domain and adding the new domain (without www.). Click OK at the bottom of the page and leave all other options on the Hosting Settings page as they are.
We now need to change the base URLs within the Magento database using PHPMyAdmin. To get to PHPMyAdmin, select your database from the drop-down menu next to the Databases icon, then click Open.
Once PHPMyAdmin has loaded (it will open within a separate browser tab/window) click on the table core_config_data in the left-hand sidebar to open it up in the main frame (Note that the table may have a separate prefix, but regardless the listings are alphabetically sorted).
Click on Search then under path select the LIKE %...% option. Next enter secure into the adjacent textbox and click the Go button.
For all entries returned containing the URL for the old domain name, you now need to edit each one and update the details to reflect the new domain URL. Ensure that you maintain the preceding http:// or https:// and any trailing / symbols or directory names on the end of each specific entry). You can edit each entry by clicking on the appropriate pencil icon, making the change to the value field and then hitting Go to save.
Finally you’ll need to clear the Magento cache so that your changes can take affect. Assuming you’re using the default Magento cache in file storage, you can do this as follows:
a) In your FTP program or using Plesk’s File Manager tool, navigate to the root of your Magento store
b) Browse to the var/cache folder (typically this will be httpdocs/var/cache, but you may not have your Magento install in the default httpdocs location)
c) Delete the contents of this folder
And that’s it! Assuming that DNS is correct for the new domain, your site should load fine when entering the new domain name in your browser.