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.
- Log in to PrestaShop Back Office
- Go to
Shop Parameters β Traffic & SEO - Scroll to Set shop URL
- 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
.htaccessfile
β οΈ Make sure hidden files are visible.
Step 2: Regenerate
- Back Office β Shop Parameters β Traffic & SEO
- Click Save
β .htaccess will be recreated automatically
β Method 3: Using Friendly URLs Toggle
Sometimes useful if URLs are broken.
- Shop Parameters β Traffic & SEO
- Turn Friendly URL β NO
- Click Save
- Turn Friendly URL β YES
- Click Save
This forces a fresh .htaccess rewrite.
π§ File Permissions (Very Important)
Make sure:
.htaccessβ 644- 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.
Β
