PrestaShop Documentation, PrestaShop Tutorials

PrestaShop how to regenerate htaccess file

In PrestaShop, regenerating the .htaccess file is easy and safe if you do it the official way. This is often needed after changing URLs, enabling SSL, or fixing 404 errors.


✅ Method 1 (Recommended): From Back Office

This is the correct and safest method.

  1. Log in to PrestaShop Back Office
  2. Go to
    Shop Parameters → Traffic & SEO
  3. Scroll to Set shop URL
  4. Click Save (don’t change anything)

👉 PrestaShop will automatically regenerate the .htaccess file


✅ Method 2: Manually Delete & Regenerate

Use this if the file is corrupted.

Step 1: Delete .htaccess

  • Connect via FTP / File Manager
  • Go to your root PrestaShop directory
  • Delete the .htaccess file

⚠️ Make sure hidden files are visible.


Step 2: Regenerate

  1. Back Office → Shop Parameters → Traffic & SEO
  2. Click Save

.htaccess will be recreated automatically


✅ Method 3: Using Friendly URLs Toggle

Sometimes useful if URLs are broken.

  1. Shop Parameters → Traffic & SEO
  2. Turn Friendly URLNO
  3. Click Save
  4. Turn Friendly URLYES
  5. Click Save

This forces a fresh .htaccess rewrite.


🔧 File Permissions (Very Important)

Make sure:

  • .htaccess644
  • Root folder → 755

If permissions are wrong, PrestaShop cannot regenerate it.


🧪 When Should You Regenerate .htaccess?

  • 404 errors on product/category pages
  • After moving site to HTTPS
  • After changing domain or subfolder
  • SEO URL issues
  • After restoring backup

📝 Tip for PrestaShop 1.7 / 8 / 9

All versions regenerate .htaccess the same way via Traffic & SEO → Save.


 

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 →