Skip to content

Instantly share code, notes, and snippets.

@mootari
Last active April 27, 2017 10:53
Show Gist options
  • Save mootari/ffef1d6b0a1a3dddbe1c3ce9f6887618 to your computer and use it in GitHub Desktop.
Save mootari/ffef1d6b0a1a3dddbe1c3ce9f6887618 to your computer and use it in GitHub Desktop.
Drupal 7: Regenerate pathauto aliases for existing nodes (per type).
<?php
$type = 'my_node_type'; $nids = db_query('select nid from node where type = :type', array(':type' => $type))->fetchCol(); pathauto_node_update_alias_multiple($nids, 'bulkupdate', array('message' => TRUE));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment