Drush
Drush commando's
Datase import/export
drush @self.production sql-dump --structure-tables-list=cache,cache_*,search_index,watchdog --extra-dump=--no-tablespaces > production.sql --debug -y
drush sql-sync @self.production @self --skip-tables-list=cache,cache_*
drush sql-sync @self @self.production
drush sql-dump > db.sql
drush @self.production sql-dump > production.sql
drush @self.production sql-dump > production.sql;drush sql-cli < production.sql;drush cr
drush sql-drop -y
drush sql-cli < db.sql
(GEEN .gz files dus niet gezipt)
Watchdog
drush ws
drush watchdog-show
drush ws 2824
drush ws --extended
drush ws --severity-min=Warning
drush ws --type=php
drush watchdog:show-one 2824
drush wd-one 2824
drush watchdog:delete all
Content import/export (bv canvas pagina's)
ddev drush content:export canvas_page 11 --dir=../content-exports
drush content:import --folder=../content-exports
Files import/export
drush rsync @self.production:%files/ @self:%files
drush rsync @production:private @self:../
Drush algemeen
drush status
drush @self.production status
drush entup
drush locale:update
drush pm:security
drush wd-show
drush wd-del all -y
drush cc drush
drush language-export --help
drush langexp
drush language-import --help
drush langimp
drush langimp --no-set-customized --no-replace-customized --no-replace-not-customized
drush langimp --langcode=nl nl.po
drush pm:list
drush image:flush --all
drush image:flush product_teaser_image
ddev drush php:eval "\Drupal::service('starterkit_layoutbuilder.helper')->removeUsedLayoutbuilderBlocks('starterkit_block_hero');"
drush php:eval "echo \Drupal::keyValue('system.schema')->get('analytics');"
drush ev "\Drupal::keyValue('system.schema')->set('analytics', (int) 8000)";
drush php-eval 'node_access_rebuild();'
// Display a one time login link for user ID 1, or another user.
drush user:login
drush php-eval '$crops = \Drupal::entityTypeManager()->getStorage("crop")->loadByProperties(["type" => "focal_point"]); foreach ($crops as $crop) { $crop->delete(); }'
drush php-eval '$crops = \Drupal::entityTypeManager()->getStorage("crop")->loadByProperties(["entity_id" => "1560"]); foreach ($crops as $crop) { $crop->delete(); }'
// check uuid in config/sync/system.site.yml
drush cdel field.field.block_content.icon_with_text.field_text
drush cdel block_content.type.icon_with_text
drush config-get "system.site" uuid
drush config-set "system.site" uuid "d3e639dc-1b60-45f1-a683-fa9653be012a"
drush config-set "language.entity.nl" uuid "7a543f55-e415-44fb-a05c-066b0a92287e"
drupal config:import:single --file="language.entity.nl.yml" --directory="../config/sync"
webform: update external libraries for webform:
drush webform:libraries:download
Drupal commando's
drupal site:mode dev
drupal site:mode prod
drupal config:export --directory="config/sync/test" --remove-uuid --remove-config-hash --optional-config=yes
drupal config:import --directory="../config/sync"
drupal settings:set application.language nl
Nieuw hash_salt genereren:
drush eval "var_dump(Drupal\Component\Utility\Crypt::randomBytesBase64(55))"