prestashop:htaccess:generate

Informations

  • Path: src/PrestaShopBundle/Command/GenerateHtaccessCommand.php
  • Options:
    • --force (-f): Force overwrite even if the file already exists (optional)

Description

This command regenerates the .htaccess file directly from the command line, without accessing the Back Office. This provides a faster and more consistent way to regenerate .htaccess, for example in deployment workflows.

If the .htaccess file already exists, the command warns and stops unless --force is passed. With --force, the existing file is overwritten.

Examples

Generate the .htaccess file

$ bin/console prestashop:htaccess:generate

Overwrite an existing .htaccess file

$ bin/console prestashop:htaccess:generate --force