# Changing the PrestaShop URL settings

> Update your PrestaShop shop URL after moving to a new domain or folder, through the admin panel or in the database for older versions.

Source: https://helpcenter.ruachost.com/apps/prestashop/changing-the-prestashop-url-settings/

You may need to change your **PrestaShop URL settings** if you migrate to a new domain, set up a temporary testing URL, or restructure your site. On **ruachost.com**, this can be done either through the PrestaShop administration interface (for newer versions) or directly in the database and configuration files (for older versions).

## Why Change URL Settings?

- Migrating to a new domain.
- Using a temporary URL for testing.
- Moving PrestaShop to a subdirectory.
- Enforcing SSL or domain consistency.

## Steps to Change URL Settings

### For PrestaShop 1.5 and Newer

1. Log in to PrestaShop as the **administrator**.
2. On the top menu bar, click **Preferences → SEO & URLs**.
3. Scroll down to the **Set shop URL** section.
4. Update the following fields:

   - **Shop domain** → Enter the new domain name.
   - **SSL domain** → Enter the new domain name for secure connections.
   - **Base URI** → Enter the base path.

     - If installed in the root directory (`public_html`), use `/`.
     - If installed in a subdirectory, use `/subfoldername`.
5. Click **Save**. ✅ PrestaShop is now configured to use the new URL settings.

### For PrestaShop 1.4 and Older

1. Log in to **cPanel**.
2. Open **phpMyAdmin**.
3. Select your PrestaShop database.
4. Locate the **ps_configuration** table.
5. Update the following rows:

   - `PS_SHOP_DOMAIN` → Enter the new domain name.
   - `PS_SHOP_DOMAIN_SSL` → Enter the new SSL domain name.
6. In **File Manager**, navigate to the PrestaShop installation folder.
7. Open the **config/settings.inc.php** file.
8. Update the `__PS_BASE_URI__` value with the correct base path.

   - Example:

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

     Save changes.
9. Log in to PrestaShop as the administrator.
10. Go to **Tools → Generators → Htaccess file generation**.
11. Select the options you want and click **Generate .htaccess file**.

✅ PrestaShop regenerates the `.htaccess` file and applies the new URL settings.

## Important Notes

- Always back up your database and configuration files before making changes.
- If you move PrestaShop to a subdirectory, update both the **Base URI** and `.htaccess`.
- Clear the **Smarty cache** after making changes to ensure updates are visible.
