Type
magento2-module
Magento 2 module to rebuild url rewrites for categories, products and cms.
magento2-module
OSL-3.0, AFL-3.0
None
None
None
None
None
None
The module adds a CLI which allows to rebuild the following URL Rewrites: categories
, products
and cms-pages
.
It's a fork from Stämpfli repository with some improvements to:
Multiple root category ID for Magento 2 Multistore.
Now when you rebuild categories' urls for specified store with a custom category root ID the correct urls are generated.
Use SEO configurations fro Admin Panel for products.
Now the configuration option Use Categories Path for Product URLs
is included during rebuilding products' urls.
When set to No
the produtct urls with subcategories in its path
will not be stored in the url_rewrite
table.
It's for the performance purpose. It prevent from generating unused urls and the table has less entries for quicker SQL queries.
Configuration option path:
Admin Panel > Stores > Settings > Configuration > Catalog > Catalog > Search Engine Optimization > Use Categories Path for Product URLs
Install the module with composer:
composer require asprada/magento2-module-rebuild-url-rewrite
Rebuild everything.
bin/magento urlrewrite:rebuild categories,products,cms-pages
Rebuild only categories
bin/magento urlrewrite:rebuild categories
Rebuild only products
bin/magento urlrewrite:rebuild products
Rebuild only cms-pages
bin/magento urlrewrite:rebuild cms-pages
Rebuild only specific categories
bin/magento urlrewrite:rebuild categories -c=25,26,27
or products
bin/magento urlrewrite:rebuild products -p=1,2,3
Rebuild only specific stores
bin/magento urlrewrite:rebuild categories -s=1,2
Any combination is possible.
See --help
for more information
bin/magento urlrewrite:rebuild --help
If you have any issues with this extension, open an issue on GitHub.
Any contribution is highly appreciated. The best way to contribute code is to open a pull request on GitHub.