Home

Awesome

“Regenerate Url rewrites” extension

Magento 2 "Regenerate Url rewrites" extension add a CLI feature which allow to regenerate a Url rewrites of products/categories in all stores or specific store. Extension homepage: https://github.com/olegkoval/magento2-regenerate_url_rewrites

CONTACTS

DONATIONS / SUPPORT ME ON

INSTALLATION

COMPOSER INSTALLATION

$> composer require olegkoval/magento2-regenerate-url-rewrites

MANUAL INSTALLATION

ENABLE EXTENSION

$> php bin/magento module:enable OlegKoval_RegenerateUrlRewrites

$> php bin/magento setup:upgrade

$> php bin/magento setup:di:compile $> php bin/magento setup:static-content:deploy

HOW TO USE IT:

$> php bin/magento ok:urlrewrites:regenerate --entity-type=product

because product entity type is default - you can skip it:

$> php bin/magento ok:urlrewrites:regenerate

$> php bin/magento ok:urlrewrites:regenerate --store-id=2

$> php bin/magento ok:urlrewrites:regenerate --entity-type=product --product-id=122

or

$> php bin/magento ok:urlrewrites:regenerate --product-id=122

$> php bin/magento ok:urlrewrites:regenerate --entity-type=product --products-range=101-152

* if in the range you have a gap of ID's (in range 101-152 products with ID's 110, 124, 150 not exists) - do not worry, script handle this.

or

$> php bin/magento ok:urlrewrites:regenerate --products-range=101-152

$> php bin/magento ok:urlrewrites:regenerate --save-old-urls

$> php bin/magento ok:urlrewrites:regenerate --no-regen-url-key

$> php bin/magento ok:urlrewrites:regenerate --no-reindex

$> php bin/magento ok:urlrewrites:regenerate --no-cache-clean

$> php bin/magento ok:urlrewrites:regenerate --no-cache-flush

$> php bin/magento ok:urlrewrites:regenerate --no-progress

REGENERATE URL REWRITES OF CATEGORY

$> php bin/magento ok:urlrewrites:regenerate --entity-type=category

$> php bin/magento ok:urlrewrites:regenerate --entity-type=category --category-id=15

$> php bin/magento ok:urlrewrites:regenerate --entity-type=category --categories-range=4-12

* if in the range you have a gap of ID's (in range 4-12 category with ID "6" not exists) - do not worry, script handle this.

** If you use options --category-id or --categories-range then you can skip option --entity-type=category - extension will understand that you want to use a category entity.

YOU CAN COMBINE OPTIONS

$> php bin/magento ok:urlrewrites:regenerate --store-id=2 --save-old-urls --no-regen-url-key --no-reindex

YOU CAN NOT COMBINE THIS OPTIONS TOGETHER

DEPRECATED OPTIONS

EXAMPLES OF USAGE

$> php bin/magento ok:urlrewrites:regenerate --entity-type=product --store-id=3 --product-id=38

or

$> php bin/magento ok:urlrewrites:regenerate --store-id=3 --product-id=38

$> php bin/magento ok:urlrewrites:regenerate --entity-type=product --store-id=2 --products-range=5-12 --no-reindex

$> php bin/magento ok:urlrewrites:regenerate --entity-type=category --category-id=22 --save-old-urls

$> php bin/magento ok:urlrewrites:regenerate --entity-type=category --categories-range=21-25 --store-id=2

Enjoy!

Best regards, Oleg Koval


* see: http://devdocs.magento.com/guides/v2.0/config-guide/cli/config-cli-subcommands.html