Skip to content

Instantly share code, notes, and snippets.

@hh-com
Last active April 18, 2023 07:55
Show Gist options
  • Save hh-com/f5b3192aeeddf8e9c7d3ea98a71f58b4 to your computer and use it in GitHub Desktop.
Save hh-com/f5b3192aeeddf8e9c7d3ea98a71f58b4 to your computer and use it in GitHub Desktop.
Helper Sheet for Contao
PHP Binary
Netcup: /usr/local/php74/bin/php -v
Hetzner: /usr/bin/php80 -v
Create a Contao installation:
/usr/local/php74/bin/php -d memory_limit=-1 -d max_execution_time=900 composer.phar create-project contao/managed-edition example 4.12
Load Contao Manager File into /web/ bzw. /public/
wget https://download.contao.org/contao-manager/stable/contao-manager.phar
make php file: mv contao-manager.phar contao-manager.phar.php
Sending Mail in CLI
Not available in Contao 4.10, 4.11 and 4.12
Contao5:
php vendor/bin/contao-console mailer:send --from=sender@example.com --to=recipient@example.com --subject=testmail --body=testmail
Show all existing services:
php vendor/bin/contao-console debug:container scop
Select one of the following services to display its information:
[0] contao.routing.scope_matcher
[1] Contao\CoreBundle\Routing\ScopeMatcher
delete Cache
php vendor/bin/contao-console cache:clear --env=dev
php vendor/bin/contao-console cache:clear --env=prod
Update the Database
php vendor/bin/contao-console contao:migrate
php vendor/bin/contao-setup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment