How to change the PrestaShop URL settings

This article describes how to change the PrestaShop URL settings. You may need to change the URL settings from time to time, such as when you migrate to a new domain, or if you want to use a temporary URL for testing.

Changing the URL settings in PrestaShop 1.5 and newer versions

In older versions of PrestaShop, you have to manually modify database tables and PHP configuration files to change the PrestaShop URL settings. In PrestaShop 1.5, you can change these settings easily from the administration interface.

To do this, follow these steps:

  1. Log in to PrestaShop as the administrator.
  2. On the top menu bar, click Preferences, and then click SEO & URLs.
  3. Scroll down to the Set shop URL section.
  4. In the Shop domain text box, type the new domain name that you want PrestaShop to use.
  5. In the SSL domain text box, type the new domain name that you want PrestaShop to use.
  6. In the Base URI text box, type the base URI.
    If you installed PrestaShop in the document root directory (for example, public_html), then the base URI is /. Alternatively, if you installed PrestaShop in a subdirectory, the base URI is /path, where path represents the folder name.
  7. Click Save. PrestaShop is now configured to use the new URL settings.

Changing the URL settings in PrestaShop 1.4 and older versions

For PrestaShop 1.4 and older versions, you must manually modify database tables and PHP configuration files to change the URL settings. To do this, follow these steps:

  1. Log in to cPanel.
    If you do not know how to log in to your cPanel account, please see this article.
  2. In the Databases section of the cPanel home screen, click phpMyAdmin.
  3. In the left-hand pane of phpMyAdmin, click the PrestaShop database. A list of tables in the database appears.
    Typically, the PrestaShop database is username_presXXX, where username represents your cPanel username, and XXX is a three-digit number.
  4. Click the ps_configuration table.
  5. Click the name column to sort the rows by name.
  6. In the name column, locate the PS_SHOP_DOMAIN row. In the value column, double-click the corresponding value for PS_SHOP_DOMAIN, and then type the new domain name that you want PrestaShop to use.
  7. In the name column, locate the PS_SHOP_DOMAIN_SSL row. In the value column, double-click the corresponding value for PS_SHOP_DOMAIN_SSL, and then type the new domain name that you want PrestaShop to use.
  8. Exit phpMyAdmin.
  9. In the Files section of the cPanel home screen, click File Manager.
  10. In the cPanel File Manager, navigate to the folder where PrestaShop is installed, and then open the config folder.
  11. Right-click the settings.inc.php file, and then click Edit.
  12. Locate the line that contains the __PS_BASE_URI__ setting, and then update the value with the base URI.
    If you installed PrestaShop in the document root directory (for example, public_html), then the base URI is /. Alternatively, if you installed PrestaShop in a subdirectory, the base URI is /path, where path represents the folder name. For example, the following line shows the base URI set to the document root directory (/):
    define('__PS_BASE_URI__', '/');
  13. Click Save Changes.
  14. Log in to PrestaShop as the administrator.
  15. On the top menu bar, click Tools, and then click Generators.
  16. Under Htaccess file generation, select the options you want, and then click Generate .htaccess file. PrestaShop regenerates the .htaccess file for your site, and it is now configured to use the new URL settings.

More Information

To view the online PrestaShop documentation, please visit http://doc.prestashop.com.

Did you find this article helpful? Then you'll love our support. Experience the A2 Hosting difference today and get a pre-secured, pre-optimized website. Check out our web hosting plans today.

We use cookies to personalize the website for you and to analyze the use of our website. You consent to this by clicking on "I consent" or by continuing your use of this website. Further information about cookies can be found in our Privacy Policy.