PHPackages                             olegkoval/magento2-regenerate-url-rewrites - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. olegkoval/magento2-regenerate-url-rewrites

ActiveMagento2-module[CLI &amp; Console](/categories/cli)

olegkoval/magento2-regenerate-url-rewrites
==========================================

Add into Magento 2 a CLI feature which allow to regenerate a Url Rewrites of products and categories

1.7.1(11mo ago)4423.7M—1.7%125[40 issues](https://github.com/olegkoval/magento2-regenerate_url_rewrites/issues)[2 PRs](https://github.com/olegkoval/magento2-regenerate_url_rewrites/pulls)2OSL-3.0PHP

Since Sep 29Pushed 11mo ago28 watchersCompare

[ Source](https://github.com/olegkoval/magento2-regenerate_url_rewrites)[ Packagist](https://packagist.org/packages/olegkoval/magento2-regenerate-url-rewrites)[ Docs](https://github.com/olegkoval/magento2-regenerate_url_rewrites)[ Fund](https://www.paypal.com/donate/?hosted_button_id=995MLRKBNY9QQ)[ Fund](https://ko-fi.com/olegkoval77)[ RSS](/packages/olegkoval-magento2-regenerate-url-rewrites/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)DependenciesVersions (29)Used By (2)

“Regenerate Url Rewrites” extension
===================================

[](#regenerate-url-rewrites-extension)

Magento 2 "Regenerate Url Rewrites" extension add a CLI feature which allow regenerating a Url rewrites of products/categories in all stores or specific store. Extension homepage: [https://github.com/olegkoval/magento2-regenerate\_url\_rewrites](https://github.com/olegkoval/magento2-regenerate_url_rewrites)

CONTACTS
--------

[](#contacts)

- Email:
- LinkedIn:

DONATIONS / SUPPORT ME ON
-------------------------

[](#donations--support-me-on)

- [PayPal](https://www.paypal.com/donate/?hosted_button_id=995MLRKBNY9QQ)
- [Patreon](https://www.patreon.com/olegkoval)

INSTALLATION
------------

[](#installation)

### COMPOSER INSTALLATION

[](#composer-installation)

- run composer command:

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

### MANUAL INSTALLATION

[](#manual-installation)

- extract files from an archive
- deploy files into Magento2 folder `app/code/OlegKoval/RegenerateUrlRewrites`

### ENABLE EXTENSION

[](#enable-extension)

- enable extension (use Magento 2 command line interface \*):

> `$> php bin/magento module:enable OlegKoval_RegenerateUrlRewrites`

- to make sure that the enabled module is properly registered, run 'setup:upgrade':

> `$> php bin/magento setup:upgrade`

- \[if needed\] re-compile code and re-deploy static view files:

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

HOW TO USE IT:
--------------

[](#how-to-use-it)

- to regenerate Url Rewrites of all products in all stores (only products) set entity type to "product":

> `$> 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`

- to regenerate, Url Rewrites in the specific store view (e.g.: store view id is "2") use option `--store-id`:

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

- to regenerate Url Rewrites of some specific product, then use option `product-id` (e.g.: product ID is "122"):

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

or

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

- to regenerate Url Rewrites of specific products range then use option `products-range` (e.g.: regenerate for all products with ID between "101" and "152"):

> `$> 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, a script handles this.

or

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

- to save a current Url Rewrites (you want to get a new URL rewites and save current) use option `--save-old-urls`:

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

- to prevent regeneration of "url\_key" values (use current "url\_key" values) use option `--no-regen-url-key`:

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

- if you do not want to run a full reindex at the end of Url Rewrites generation then use option `--no-reindex`:

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

- if you do not want to run cache:clean at the end of Url Rewrites generation then use option `--no-cache-clean`:

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

- if you do not want to run cache:flush at the end of Url Rewrites generation then use option `--no-cache-flush`:

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

- if you do not want to display a progress bar in the console then use option `--no-progress`:

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

#### REGENERATE URL REWRITES OF CATEGORY

[](#regenerate-url-rewrites-of-category)

- to regenerate Url Rewrites of all categories in all stores, set an entity type to "category":

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

- to regenerate Url Rewrites of some specific category, then use option `category-id` (e.g.: category ID is "15"):

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

- to regenerate Url Rewrites of specific categories range then use option `categories-range` (e.g.: regenerate for all categories with ID between "4" and "12"):

> `$> 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, a script handles 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

[](#you-can-combine-options)

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

### YOU CANNOT COMBINE THESE OPTIONS

[](#you-cannot-combine-these-options)

- `--entity-type=product` and `--category-id`/`--categories-range`
- `--entity-type=category` and `--product-id`/`--products-range`
- `--category-id` and/or `--categories-range` and/or `--product-id` and/or `--products-range`

### DEPRECATED OPTIONS

[](#deprecated-options)

- `--check-use-category-in-product-url` — extension uses a built-in Magento Url Rewrites generator which check this option in any way.

### EXAMPLES OF USAGE

[](#examples-of-usage)

- Regenerate Url Rewrites for product with ID "38" in store with ID "3":

> `$> 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`

- Regenerate Url Rewrites for products with ID's 5,6,7,8,9,10,11,12 in store with ID "2" and do not run full reindex at the end of process:

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

- Regenerate Url Rewrites for category with ID "22" in all stores and save current Url Rewrites:

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

- Regenerate Url Rewrites for categories with ID's 21,22,23,24,25 in store with ID "2":

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

Enjoy!

Best regards, Oleg Koval

###  Health Score

59

—

FairBetter than 99% of packages

Maintenance49

Moderate activity, may be stable

Popularity64

Solid adoption and visibility

Community34

Small or concentrated contributor base

Maturity74

Established project with proven stability

 Bus Factor1

Top contributor holds 80.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~103 days

Recently: every ~396 days

Total

28

Last Release

354d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/254432?v=4)[Oleg Koval](/maintainers/olegkoval)[@olegkoval](https://github.com/olegkoval)

---

Top Contributors

[![olegkoval](https://avatars.githubusercontent.com/u/254432?v=4)](https://github.com/olegkoval "olegkoval (98 commits)")[![ihor-sviziev](https://avatars.githubusercontent.com/u/1873745?v=4)](https://github.com/ihor-sviziev "ihor-sviziev (7 commits)")[![schmengler](https://avatars.githubusercontent.com/u/367320?v=4)](https://github.com/schmengler "schmengler (3 commits)")[![renttek](https://avatars.githubusercontent.com/u/1931090?v=4)](https://github.com/renttek "renttek (2 commits)")[![kanduvisla](https://avatars.githubusercontent.com/u/346681?v=4)](https://github.com/kanduvisla "kanduvisla (1 commits)")[![nige-one](https://avatars.githubusercontent.com/u/6023314?v=4)](https://github.com/nige-one "nige-one (1 commits)")[![petterjv](https://avatars.githubusercontent.com/u/9767637?v=4)](https://github.com/petterjv "petterjv (1 commits)")[![quyendam2612](https://avatars.githubusercontent.com/u/7499832?v=4)](https://github.com/quyendam2612 "quyendam2612 (1 commits)")[![rakibabu](https://avatars.githubusercontent.com/u/14089150?v=4)](https://github.com/rakibabu "rakibabu (1 commits)")[![samcleathero](https://avatars.githubusercontent.com/u/3945502?v=4)](https://github.com/samcleathero "samcleathero (1 commits)")[![simonrl](https://avatars.githubusercontent.com/u/3898987?v=4)](https://github.com/simonrl "simonrl (1 commits)")[![avstudnitz](https://avatars.githubusercontent.com/u/662059?v=4)](https://github.com/avstudnitz "avstudnitz (1 commits)")[![zfmaster](https://avatars.githubusercontent.com/u/10129233?v=4)](https://github.com/zfmaster "zfmaster (1 commits)")[![fransyrcc](https://avatars.githubusercontent.com/u/31028986?v=4)](https://github.com/fransyrcc "fransyrcc (1 commits)")[![jaychow](https://avatars.githubusercontent.com/u/2101993?v=4)](https://github.com/jaychow "jaychow (1 commits)")[![jean-bernard-valentaten](https://avatars.githubusercontent.com/u/22167006?v=4)](https://github.com/jean-bernard-valentaten "jean-bernard-valentaten (1 commits)")

---

Tags

extensionmagentomagento2phpregenerate-url-rewritesmagentoextensionmodulemagento2 modulemagento 2 modulemagento 2 extensionmagento2 extension

### Embed Badge

![Health badge](/badges/olegkoval-magento2-regenerate-url-rewrites/health.svg)

```
[![Health](https://phpackages.com/badges/olegkoval-magento2-regenerate-url-rewrites/health.svg)](https://phpackages.com/packages/olegkoval-magento2-regenerate-url-rewrites)
```

###  Alternatives

[magepsycho/magento2-custom-shipping

Magento 2 Custom Shipping

697.5k](/packages/magepsycho-magento2-custom-shipping)[magepsycho/magento2-storepricing

Magento 2 Store View Pricing

2520.9k](/packages/magepsycho-magento2-storepricing)[magepsycho/magento2-discountlimit

Magento 2 Discount Amount Limiter

1111.6k](/packages/magepsycho-magento2-discountlimit)[werfu/magento2-url-key-mask

Enable Product and Category URL\_key generation using masks

135.4k](/packages/werfu-magento2-url-key-mask)[magepsycho/magento2-seosuite

Magento 2 FREE SEO Suite

106.3k](/packages/magepsycho-magento2-seosuite)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
