Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bsingr/e3ff80534e9e4f7d50ba6b240e932c80 to your computer and use it in GitHub Desktop.
Save bsingr/e3ff80534e9e4f7d50ba6b240e932c80 to your computer and use it in GitHub Desktop.
Run a single specific Drupal update hook using Drush
drush php-eval "module_load_install('MYMODULE'); MYMODULE_update_NUMBER();"
# or
drush php:cli
require 'core/modules/taxonomy/taxonomy.post_update.php';
taxonomy_post_update_add_unpublished_nodes_to_taxonomy_index($sandbox);
@bohemier
Copy link

in D9: drush php-eval "\Drupal::moduleHandler()->loadInclude('MYMODULE', 'install'); MYMODULE_update_NUMBER();"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment