Skip to content

Instantly share code, notes, and snippets.

@newtone
Last active May 6, 2022 18:17
Show Gist options
  • Save newtone/e85335cb3255842d050ea2769cecbc6c to your computer and use it in GitHub Desktop.
Save newtone/e85335cb3255842d050ea2769cecbc6c to your computer and use it in GitHub Desktop.
# Database
## Export DB
drush cr
drush sql-dump > ~/my-sql-dump-file-name.sql
## Download DB
scp [email protected]:~/my-sql-dump-file-name.sql ~/Desktop/
## Import DB
drush sql-drop
drush sql-cli < ~/my-sql-dump-file-name.sql
# Get new Login from url
drush uli
# Theme specific
theme-enable => pm-enable
theme-disable => pm-disable
theme-info => pm-info
theme-list => pm-list --type=theme
theme-list-enabled => pm-list --type=theme --status=enabled
theme-set-default => vset theme_default
theme-set-admin => vset admin_theme
theme-status => status theme
drush theme:uninstall THEME_MACHINE_NAME
drush theme:enable THEME_MACHINE_NAME
drush config-set system.theme default THEME_MACHINE_NAME e.g. drush config-set system.theme default bartik
# Composer cheatsheet
https://devhints.io/composer
# Generate hash salt
drush php-eval 'echo \Drupal\Component\Utility\Crypt::randomBytesBase64(55) . "\n";'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment