PrestaShop uses the Symfony Console component and provides its own set of CLI commands for developers and administrators.
Console commands (also called CLI commands or terminal commands) allow you to perform various PrestaShop operations from the command line without using the Back Office. These commands are particularly useful for:
All commands are executed from your PrestaShop root directory using:
php bin/console [command-name] [arguments] [options]
Example:
php bin/console prestashop:module install ps_banner
To see all available commands:
php bin/console list
To get help for a specific command:
php bin/console [command-name] --help
PrestaShop provides the following console commands for various tasks. The list below is automatically generated from the command documentation files.
You can also create your own console commands for your modules. See the Symfony documentation on Creating Console Commands for more information.
# Clear cache
php bin/console cache:clear
# Rebuild search index
php bin/console prestashop:search:index --full
# Regenerate thumbnails nightly
0 2 * * * cd /path/to/prestashop && php bin/console prestashop:thumbnails:regenerate
# Rebuild search index
php bin/console prestashop:search:index --full
# Export translations before release
php bin/console prestashop:translation:export-module mymodule en-US