Tags

install

  1. su - drupal
  2. cd /var/www/DRUPALPROJECT
  3. composer require drush/drush:^12 -w
  4. ./vendor/bin/drush --version

vim ~/.zshrc

# Add ./vendor/bin to PATH only if it exists
function update_vendor_bin_path() {
    if [ -d "$PWD/vendor/bin" ]; then
        export PATH="$PWD/vendor/bin:$PATH"
    else
        # Remove ./vendor/bin from PATH if no longer exists
        PATH=$(echo "$PATH" | awk -v RS=: -v ORS=: '/vendor\/bin/ {next} {print}' | sed 's/:$//')
    fi
}

# Hook to dynamically update PATH when changing directories
autoload -U add-zsh-hook
add-zsh-hook chpwd update_vendor_bin_path
update_vendor_bin_path  # Ensure it's applied to the current directory

start

SITEDOMAIN=DOM.TLD

Theme

  1. drush -l $SITEDOMAIN pm-list --type=theme
  2. drush -l $SITEDOMAIN cget system.theme admin
  3. drush -l $SITEDOMAIN cset system.theme admin adminimal_theme

core.extension

  1. drush -l $SITEDOMAIN cdel core.extension module.MODULENAME
  2. https://www.drupal.org/node/3137656 

debug

  1. dr -l $SITEDOMAIN ws
  2. drush st