5

How to bulk update existing URL alias?

I have Path auto module add path alias to URLs. I have changed the URL alias pattern. Now I want to update the pattern of old URLs also.

How can I achieve this?

  • this answer is really worth reading first. It suggests a much more easy to control solution and gives a good explanation as to why – ja_him Jan 8 at 16:43
6

it works only to URL which does not have path alias – Vamsi

Then first go to /admin/config/search/path/delete_bulk and delete the aliases in question.

Then update /admin/config/search/path/update_bulk

  • it works only to URL which does not have path alias – Vamsi May 9 '16 at 9:41
  • @vamsi updated answer. – No Sssweat May 9 '16 at 9:44
  • @Vamsi how did it go? – No Sssweat May 11 '16 at 10:55
3

go to configuration > Search and metadata > Url aliases > bulk generate.

If you already have already aliases and want to change them to the new ones you could delete all the content aliases first, is another option in url aliases.

2

With Pathauto you can delete all the content aliases and then bulk generate new ones - but this does not address the problem if you have many pages with custom aliases mixed with automatic aliases as these will also be deleted. Bulk generate will only generate aliases for nodes that are checked for automatic alias AND has no alias - deleted unchecked auto alias nodes will revert back to default pattern of node/#

To get around this issue you can use Administrative views (or your own view with bulk operations)

  1. go to Pathauto and change your URL pattern to the new desired pattern.
  2. go to admin/content (using Admin Views with VBO)
  3. select all nodes with aliases you want to update
  4. choose operation - unpublish
  5. choose operation - publish
  6. go see your new updated aliases :)

The idea here is just to change something so that the nodes are saved again, the aliases are updated with the current pattern upon save. and using VBO allows you to do as many as you want, and you could add extra exposed filters to your View to better select your list of nodes to update.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.