customgento / module-default-store-code-remover-m2

customgento/module-default-store-code-remover-m2

Default Store Code Remover for Magento 2 hides the store code in the default store from the URL.

  • Team CustomGento
magento2-module Compatibility: 2.4.7-2.4.9 Code Quality: Warning Tests: Fail Security: Pass OSL-3.0

Default Store Code Remover for Magento 2

Default Store Code Remover for Magento 2 hides the store code in the default store from the URL. The module is in effect only when web/url/use_store is enabled and is meant to be used for multistore setups, where the default shop should not contain any store code, whereas all other stores should.

The module also provides an optional, extended configuration to control store code removal per store view:

  • Configuration path: Store > Configuration > Genral > Web
  • Setting: Configure Store Code Removal Per Store (Yes/No)
    • Default value: No (backwards compatible)
      • Uses the original behavior: the store code is removed from the default store view URL, while all other store views keep their store code in the URL.
    • If set to Yes
      • An additional setting becomes available with a list of store views.
      • Only the selected store views will have the store code removed from the URL.
      • All non-selected store views will keep the store code in the URL.

Installation

  • composer require customgento/module-default-store-code-remover-m2
  • bin/magento module:enable CustomGento_DefaultStoreCodeRemover
  • bin/magento setup:upgrade
  • bin/magento cache:flush
  • bin/magento setup:di:compile

Example

When the store codes in the url are disabled, the URL of the stores looks like this: https://website.com/.

When the store codes in the url are enabled, the URL of the stores looks like this: https://website.com/store_code/.

When this extension is installed and enabled, and the store codes are enabled to be shown in the url under
Store > Configuration > General > Web >Add Store Code, the module will not show the store code for the default store
but will show it for any other store.

So, for the default store the url will be https://website.com/ while for all other store, the URL will be : https://website.com/store_code

License

OSL - Open Software Licence 3.0

Copyright

© 2021 - present CustomGento GmbH

No changelog yet

The vendor hasn't published a changelog. Tagged releases appear in the Versions tab.

Versions
Version Stability QA Status Compatibility Released
3.1.0 stable Fail Magento 2.4.7-2.4.9 Details 2026-05-06 07:11:59
3.0.0 stable Not tested Not yet tested Details 2026-04-24 09:26:19
2.0.0 stable Not tested Not yet tested Details 2025-09-09 12:54:20
1.0.6 stable Not tested Not yet tested Details 2025-05-27 12:40:42
1.0.5 stable Not tested Not yet tested Details 2024-06-03 11:27:35
1.0.4 stable Not tested Not yet tested Details 2024-05-26 19:46:28
1.0.3 stable Not tested Not yet tested Details 2024-01-26 14:42:08
1.0.2 stable Not tested Not yet tested Details 2023-06-19 12:20:19
1.0.1 stable Not tested Not yet tested Details 2022-05-04 11:08:42
1.0.0 stable Not tested Not yet tested Details 2020-09-28 13:13:15

Requires 2

Package Constraint
php ~8.1.0||~8.2.0||~8.3.0||~8.4.0||~8.5.0
magento/module-store ~101.0

Suggests 1

Package Reason
customgento/module-default-store-code-remover-m2-mageworx-compatibility This module ensures compatibility with MageWorx extensions.

Compatibility

Each Magento release line is installed on its supported PHP versions, then the module is built (DI compilation + static-content deploy) and its unit and integration suites are run. The matrix shows the lines and PHP versions the module is confirmed to install and run on. Code-quality results further down (phpstan, phpcs, …) are reported separately and never affect compatibility.

Compatibility matrix (Magento × PHP)
Magento PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
2.4.7 Pass Pass
2.4.8 Pass Pass
2.4.9 Pass Pass

Code Quality - Static Tests

Checks run directly against the module's source code, independent of any Magento or PHP version: coding standards (phpcs), mess detection (phpmd), copy-pasted code (cpd), PHP cross-version compatibility, composer.json validity, and a security audit of its declared dependencies. Each runs once.

Static code-quality results
Tool Status Findings Summary
PHPCS Warning 1 1 warning (ruleset: Magento2) — 1 auto-fixable with phpcbf
PHPMD Pass 0
Cpd Pass 0
Composer validate Pass 0
Composer audit Pass 0

Code Quality - PHPStan

PHPStan type-checks the module's PHP against a real Magento install (so framework and core-module symbols resolve) at the configured gate level. Because the available symbols differ between releases, it runs separately for each Magento and PHP version. The grid below shows the result for each pairing; select one to see its findings. This never affects compatibility.

PHPStan results by Magento and PHP version
Magento PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
2.4.7 Pass Pass
2.4.8 Pass Pass
2.4.9 Pass Pass

Tests

Unit and integration suites, run for each applicable Magento and PHP version. A test failure speaks to the module's behaviour, not its compatibility with a Magento line, so it is reported here separately and never reddens the compatibility matrix.

Unit tests

Unit tests results by Magento and PHP version
Magento PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
2.4.7 N/A N/A
2.4.8 N/A N/A
2.4.9 N/A N/A

Integration tests

Integration tests results by Magento and PHP version
Magento PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
2.4.7 Pass Pass
2.4.8 Pass Pass
2.4.9 1 not tested
License
OSL-3.0
Authors

More from customgento

View vendor
Make it pay

Turn an existing module into recurring revenue.

If you already maintain a Magento 2 module on GitHub or GitLab, listing it on Packagento takes about five minutes. We mirror your tags, handle distribution signing, and route paid licenses through Stripe Connect, so you can keep shipping the way you already do.