Guia de comandos para usar DDEV. Como usar Drush y DDEV. Deshabilitar cache de twig con DDEV. Y otros comandos utiles.
Comandos
# Apagar todos los containers. ddev poweroff # Stop the container(s). ddev stop # Iniciar un container. ddev launch # Reiniciar el container ddev restart # Run composer install. ddev composer install # Install composer modules. ddev composer require 'drupal/MODULENAME' # Import SQL database given a filepath. ddev import-db --file=YOURSQLFILE.sql # Import files like images, videos, etc. ddev import-files --source=/path/to/files.tar.gz # Exportar DB ddev export-db -f mysite. sql. gz # Para usar drush simplemente hacemos ddev drush mi_comando # Borrar cache D9 ddev drush cr # Borrar cache D7 ddev drush cc all # Deshabilitar TWIG cache ddev drush state:set twig_debug 0 --input-format=integer # One time login ddev drush user:login --name=username # Desinstalar modulo ddev drush pm:uninstall oauth2 # Actualizar modulos drupal 7 ddev drush up admin_views
Deshabilitar Drupal/Twig cache
ddev drush state:set twig_debug 1 --input-format=integer ddev drush state:set twig_cache_disable 1 --input-format=integer ddev drush state:set disable_rendered_output_cache_bins 1 --input-format=integer ddev drush cache:rebuild
Deshabilitar Twig debug mode:
drush state:set twig_debug 0 --input-format=integer && \ drush state:set twig_cache_disable 0 --input-format=integer && \ drush state:set disable_rendered_output_cache_bins 0 --input-format=integer && \ drush cache:rebuild
Incrementar limite de memoria DDEV
Crear archivo en .ddev/php/php.ini y luego hacer ddev restart
[PHP] memory_limit = 4G