How to modify the domain and/or folder associated with Prestashop

How to modify the domain and/or folder associated with Prestashop

When we modify the site of our PrestaShop installation, the store may stop working. This happens because, at the time of installing PrestaShop, the current path is stored.
To modify the paths of our installation, we must manage the PrestaShop installation database as follows.
 
We access phpMyAdmin of our hosting.
http://domain.com/phpMyAdmin (replace domain.com with your own domain).
 
We select the database of our installation. If there is only one database, it will be automatically selected:
 
 
We enter the table "ps_shop_url":
 
 
We edit the "domain" and "domain_ssl" fields if we have changed the hosting domain name.
We edit the "physical_uri" field only if we have changed the folder where PrestaShop is installed.
 
 
Once the modifications are made, we save the changes.

If we have modified the folder where PrestaShop is installed, we must also modify the .htaccess file located in the root of the PrestaShop installation.
To edit it, we can download it via FTP and edit it using a text editor.
 
When editing the file, we must modify the line that indicates the folder where PrestaShop is installed.
 
RewriteRule . - [E=REWRITEBASE:/prestashopfolder/]
 
Simply replace the current folder name with the name of the folder where you moved PrestaShop.
If you moved it to the root, you must leave only a single slash "/".
 
Example: if PrestaShop is located in a new folder:
RewriteRule . - [E=REWRITEBASE:/newfolder/]
 
Example if PrestaShop is located in the root:
RewriteRule . - [E=REWRITEBASE:/]
 
Once these changes are made, your PrestaShop will be configured with the new location.
 
 
For more information, you can contact us.
    • Related Articles

    • How to modify the Moodle associated domain

      When we modify the site of our Moodle installation, the website loads incorrectly and we cannot access it. This happens because, at the time of installing Moodle, the current path is recorded. To modify the paths, we need to edit the Moodle ...
    • How to modify the associated domain of the Prestashop

      When we modify the site of our PrestaShop installation, the website loads incorrectly, the template or stylesheet does not load, we cannot access the admin panel, etc. This happens because, at the time of installing our PrestaShop, the current path ...
    • How to modify the Magento associated domain

      When we modify the site of our Magento installation, the website loads incorrectly. This happens because, at the time we installed Magento, the current path was registered. To modify the paths of our installation, we need to manage the Magento ...
    • The test platform is published with .mialias.net How is it solved?

      The test platform is a free service that allows you to have a hosting space without having a domain pointing to this test platform. This means that the test platform can be accessed with "internal" access, which is what we call with the ...
    • How to set up the database in Prestashop

      PrestaShop is a popular e-commerce platform that allows you to create and manage your online stores effectively. A fundamental part of PrestaShop configuration is the correct database setup. The database stores critical information about products, ...