Adopting Links
Adopting existing links #
If your Dub workspace already contains short links for your entries — created manually or before installing the plugin — you can hand them over to the plugin in one pass:
php craft dub/adopt
This scans your workspace, matches each link to a Craft entry by the path of its destination URL, sets the entry's externalId on the link so the plugin manages it going forward, and records it locally. Links with no matching entry (or a path shared by more than one site) are left untouched.
Add --dry-run to preview what would be adopted without making any changes:
php craft dub/adopt --dry-run
If some of your Dub links point to an old path prefix, use --rewrite to remap the destination path when matching. It only applies as a fallback, when the link's original path matches no entry. Pass one or more comma-separated from=to prefixes:
php craft dub/adopt --rewrite="/areas-stages/=/venues/"