Email
Share

We Rock Your Web Forum » Content Management Systems » Drupal

Drupal mass delete aliases?

(3 posts)
  1. sam

    member
    Joined: Aug '09
    Posts: 19

    Is there a way to mass delete aliases in Drupal? I've ported over a database from another site and there's literally hundreds of unused aliases I need to get rid of. Even better would be a way to delete aliases that are not in use.

    I'm using Drupal 6.x. Currently, on the alias setting screen, I'm only able to delete aliases one at a time.

    Posted 1 year ago #

  2. Posted 1 year ago
  3. cwd

    senior admin
    Joined: Jul '09
    Posts: 225

    You can delete all the aliases and then re-create them in pathauto (under automated alias settings). For each user/ node/ taxonomy - click on "Bulk generate aliases for nodes that are not aliased" and hit "Save configuration" at bottom.
    Make sure you have "Create a new alias. Delete the old alias." set as the update action under "General settings" (you'll probably want to change this back to "Do nothing. Leave the old alias intact" when you're done to avoid inadvertently overwriting aliases for indexed pages.

    One thing to note before you do this - the aliases will be recreated according to the settings you have chosen. If you previously created any manual aliases, these might differ from the newly created aliases. This can result in a duplicate content penalty from search engines in the event that they have the page indexed under both aliases.

    Posted 1 year ago #
  4. Anonymous



    You can also set a cron script to run drush php-eval '_pathauto_include() ; node_pathauto_bulkupdate()' periodically to bulk update node aliases.

    Posted 1 year ago #

RSS feed for this topic

Reply

(required)

Allowed markup: BBcode blockquote code em strong ul ol li font strike center u hr.
You can also put code in between backtick ( ` ) characters.