Like the majority of web platforms, Prestashop works with a domain name which implies that any change in the domain name implies changes in the database especially on the PS_SHOP_DOMAIN and PS_SHOP_DOMAIN_SSL options, These changes can be made via the PhpMyAdmin tool available on your cPanel.
For PrestaShop 1.4.x or earlier:
- Connect from your cPanel on the PhpMyAdmin tool and select your database
- Browse the ps_configuration table where are the folders of PS_SHOP_DOMAIN and PS_SHOP_DOMAIN_SSL and insert the information for the new domain name
- Check the Prestashop configuration file (config folder at the root of your installation) settings.inc.php, Look for the line (‘__ PS_BASE_URI__’, ‘/’)
If your Prestashop installation is located in the root web folder of your domain name, no changes are necessary. However, if the installation is located in a subfolder, the following change should be made
define (‘__ PS_BASE_URI__’, ‘/ subfolder /’);
Where “subfolder” is the actual name of the folder where Prestashop was installed.
For Prestashop 1.5.x or newer versions:
- Connect to PhpMyadmin from your cPanel
- Select the table, go to the shop_url option and modify the values for the records: domain and domain_ssl.
- Still in the same table, in physical_url record specify the subfolder to which your site points. In the case where it is at the root of the domain, you will have to change the physical_url to “/”.
Note: In case you want to use a temporary URL you will have to add IP / hostname of the server for registrations: domain and domain_ssl then change the physical_url to / ~ username / subfolder /.
Examples:
For Prestashop installed in mydomain.com/subdomain:
The records must be:
domain = domain.com
domain_ssl = domain.com
physical_url = / subdomain /
If you want to access the same installation using the temporary URL, you will need to define:
domain = server IP or hostname
domain_ssl = server IP or hostname
physical_url = / ~ username / subdomain /