If an entity has opted into auto generated paths, you could simply re-save the entity. However saving an entity is particularly inefficient, and the path/routing system runs outside of the entity system.

How do I update a path for an entity without saving the entity?

1 Answer 1


You could use the pathauto.generator service provided by Pathauto:

\Drupal::service('pathauto.generator')->updateEntityAlias($entity, 'update');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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