Skip to main content

sys:url:regenerate

Regenerate product, category, and CMS page URL rewrites.

note

This command was introduced with version 9.1.0.

Usage

n98-magerun2.phar sys:url:regenerate [options]

Options:

OptionDescription
--productsComma separated product IDs. Leave empty to process all products.
--categoriesComma separated category IDs. Leave empty to process all categories.
--cms-pagesComma separated CMS page IDs. Leave empty to process all CMS pages.
--storeStore ID. Default processes all stores.
--all-productsRegenerate all products.
--all-categoriesRegenerate all categories.
--all-cms-pagesRegenerate all CMS pages.
--batch-sizeBatch size for pagination (default: 100).

Examples

Regenerate URL rewrites for specific products and categories in store 1:

n98-magerun2.phar sys:url:regenerate --products 1,2 --categories 3 --store 1

Regenerate all products and categories for all stores:

n98-magerun2.phar sys:url:regenerate --all-products --all-categories

Regenerate all CMS pages for store 2 with a custom batch size:

n98-magerun2.phar sys:url:regenerate --all-cms-pages --store 2 --batch-size 50