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:
- Log in to PrestaShop as the administrator.
- On the top menu bar, click , and then click .
- Scroll down to the Set shop URL section.
- In the Shop domain text box, type the new domain name that you want PrestaShop to use.
- In the SSL domain text box, type the new domain name that you want PrestaShop to use.
- 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.
- 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:
- Log in to cPanel.
If you do not know how to log in to your cPanel account, please see
this article.
- In the Databases section of the cPanel home screen, click phpMyAdmin.
- 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.
- Click the ps_configuration table.
- Click the name column to sort the rows by name.
- 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.
- 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.
- Exit phpMyAdmin.
- In the Files section of the cPanel home screen, click File Manager.
- In the cPanel File Manager, navigate to the folder where PrestaShop is installed, and then open the config folder.
- Right-click the settings.inc.php file, and then click Edit.
- 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__', '/');
- Click Save Changes.
- Log in to PrestaShop as the administrator.
- On the top menu bar, click , and then click .
- 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.
To view the online PrestaShop documentation, please visit http://doc.prestashop.com.