How to configure Prestashop to work with another domain

Prestashop, like many other applications out there, works based on a domain name. In case you wish to use your Prestashop application with a different domain you should change the PS_SHOP_DOMAIN and PS_SHOP_DOMAIN_SSL options in your Prestashop's database. To edit these options you can use the phpMyAdmin tool available in cPanel.

For PrestaShop 1.4.x or the older versions:

Log into cPanel and access phpMyAdmin, after which select your Prestashop database and browse the table ps_configuration where the PS_SHOP_DOMAIN and PS_SHOP_DOMAIN_SSL records are located. Change their values to match your new domain name.
You should also make sure that your Prestashop's base directory is correctly set in the application's configuration file – settings.inc.php. You can find the configuration file in the config folder, located in the root of your Prestashop installation. You can edit the configuration file via FTP or by using cPanel's File Manager tool.
Once you have opened the file for editing look for the line:
define('__PS_BASE_URI__', '/');
In case your Prestashop installation is located in the web root folder of your domain name, this line should remain as above. If the installation is located into a sub folder, the line should be changed to reflect its location:
define('__PS_BASE_URI__', '/subfolder/');
Where “subfolder” is the actual name of the folder where Prestashop has been installed.

For Prestashop 1.5.x or the newer versions:

The only thing that you need to do it to change the shop URL from the database. In order to do that you will need to:

Log into cPanel and access phpMyAdmin. Locate the table shop_url and change the values for the records: domain and domain_ssl to your domain name.

Then change the value of the record physical_url in the same table to the sub-folder that your application is located in. If you have installed the Prestashop directly in the domain's document root, you will need to to change the physical_url to " / ".

Note: If you would like to configure your Prestashop to work with a temporary URL, you will need to add the server's IP/hostname to the records: domain and domain_ssl and then change the physycam_url to /~username/subfolder/.

Examples:

For Prestashop installed in example.com/subfolder:

The records should be:

domain = example.com
domain_ssl = example.com
physical_url = /subfolder/

If you want to access the same installation using the temporary URL, you will need to set:

domain = server IP or hostname
domain_ssl = server IP or hostname
physical_url = /~username/subfolder/

You need help with a shopping cart? SiteGround is specialized in eCommerce hosting and provides expert support for a large number of shopping carts. Check out our shopping cart hosting services!

* (Required)