Anyone know if there is a way to rebuild specific items in link database through a custom script targeting specific items to rebuild links to?

OOB Sitecore only supports rebuilding the whole link database and depending on the size this could take many hours.

2 Answers 2


The simplest method is just save that item. Sitecore will do the rest.

There is an event handle:

<handler type="Sitecore.Links.ItemEventHandler, Sitecore.Kernel" method="OnItemSaved"/>

It calls

`LinkDatabase.UpdateItemVersionReferences` method passing saved item.

Another option is to call




from custom code or script.


You can use the Sitecore PowerShell to update the Links Database.

I have a blog with a script that gets a start item and updates links for all the descendants. Find it here, https://darjimaulik.wordpress.com/2022/08/06/rebuild-link-database-for-an-individual-items/

And short part of the script as below.

$items = Get-ChildItem -Path $StartItemPath -Recurse
foreach ($item in $items)

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.