1. Home
  2. References
  3. Technical Advice
  4. Modify a domain name for Prestashop

Modify a domain name for Prestashop

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:

  1. Connect from your cPanel on the PhpMyAdmin tool and select your database
  2. 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
  3. 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:

  1. Connect to PhpMyadmin from your cPanel
  2. Select the table, go to the shop_url option and modify the values ​​for the records: domain and domain_ssl.
  3. 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 /

Updated on 18 August 2021

Was this article helpful?

Related Articles