CLI Commands for Cross-Linking Extension
Looking for Cross-Linking Extension for Automated Internal Linking? View the full Cross-Linking Extension for Automated Internal Linking page to explore features, configuration options, and pricing.
Command line tools for the Cross-Linking extension. These commands help you debug and verify cross-link replacements without visiting the frontend. Useful when setting up new rules, troubleshooting why a keyword isn't being replaced, or validating that your configuration produces the expected output.
Available Commands
| Command | Description |
|---|---|
magmodules:crosslinking:preview |
Preview cross-link replacements for a specific entity |
magmodules:crosslinking:preview
Shows what a product description, category description, or CMS page content looks like before and after cross-link replacement. Runs the same replacement logic that the frontend uses, so you can verify output without flushing cache or visiting the page.
bin/magento magmodules:crosslinking:preview --entity-type=product --entity-id=42
Options
| Option | Short | Required | Description |
|---|---|---|---|
--entity-type |
-t |
Yes | Entity type: product, category, or cms |
--entity-id |
-i |
Yes | The entity ID to preview |
--store-id |
-s |
No | Store view ID (default: 0) |
What It Does
- Loads the description content for the specified entity
- Displays the original content (BEFORE)
- Runs the cross-link replacement engine against the content
- Displays the result with links inserted (AFTER)
The command respects all configuration settings: entity-type enable/disable, max links per page, case sensitivity, rule priority, and store view scoping.
Examples
Preview a product description:
bin/magento magmodules:crosslinking:preview --entity-type=product --entity-id=42
Preview a category description for a specific store:
bin/magento magmodules:crosslinking:preview --entity-type=category --entity-id=15 --store-id=1
Preview CMS page content:
bin/magento magmodules:crosslinking:preview --entity-type=cms --entity-id=2
Example Output
--- BEFORE ---
Our yoga mats are made from premium materials. Whether you practice yoga
daily or prefer hiking on weekends, we have the right gear for you.
--- AFTER ---
Our <a href="/collections/yoga-mats.html" title="Yoga Mats">yoga mats</a>
are made from premium materials. Whether you practice yoga daily or prefer
<a href="/outdoor/hiking.html">hiking</a> on weekends, we have the right
gear for you.
When to Use
- After creating or modifying cross-link rules, to verify they match correctly
- When debugging why a keyword isn't being replaced on a specific page
- To test rule priority and overlapping keyword behavior
- To verify store-scoped rules are applied correctly
- Before flushing cache — see the result without affecting live pages
Error Messages
| Message | Cause |
|---|---|
Module is not enabled |
The module is disabled in General configuration |
Both --entity-type and --entity-id are required |
Missing required options |
Unknown entity type "..." |
Invalid entity type (use: product, category, or cms) |
No description content found for this entity |
The entity has no description/content set |
Need More Help?
Documentation:
- All Help Articles - Complete documentation overview
Support:
- Contact Support - Get help from our team
For a complete overview of features and configuration options, see Cross-Linking Extension for Automated Internal Linking.