PrestaShop Documentation, PrestaShop Tutorials

PrestaShop Where is __PS_BASE_URI__ defined?

In PrestaShop, the __PS_BASE_URI__ constant is used to define the base URL for your PrestaShop store. This constant is typically defined in the config/settings.inc.php file within your PrestaShop installation. Here’s how it’s typically defined:

php
define('__PS_BASE_URI__', '/');

The value assigned to __PS_BASE_URI__ should be the base URL of your PrestaShop store. In most cases, it is set to '/', indicating that your store is installed in the root directory of your web server.

However, if you’ve installed PrestaShop in a subdirectory or a different location, you should set __PS_BASE_URI__ to the appropriate URL path relative to your domain. For example:

php
define('__PS_BASE_URI__', '/my-store/');

This would be used if your PrestaShop store is installed in a subdirectory named “my-store.”

It’s important to note that modifying this constant should be done with caution, as incorrect values can lead to issues with your store’s URLs and links. Always make a backup of your configuration files before making any changes, and ensure that you’re using the correct value for your specific setup.

About zohaibk

We develop useful addons for #E-Commerce and #CRM software to provide extra features.#PrestaShop,#Magento,#SugarCRM,#Vtiger & #Android #apps
View all posts by zohaibk →