Question

I want to disable all third-party modules and Magento's optional modules, for example, DHL, Klarna, Temando, Vertex, etc.

I disabled via admin panel and CLI

There is a different way to exclude them?

Was it helpful?

Solution

You can remove them via Composer.

You could install the Yireo module:

composer require yireo/magento2-replace-all:2.3.1

OR

You might be able to specify the packages to be removed in your composer.json and running composer update.

Examples

Remove all third-party core modules

"replace": {
        "amzn/amazon-pay-and-login-magento-2-module": "*",
        "amzn/amazon-pay-and-login-with-amazon-core-module": "*",
        "amzn/amazon-pay-module": "*",
        "amzn/amazon-pay-sdk-php": "*",
        "amzn/login-with-amazon-module": "*",
        "dotmailer/dotmailer-magento2-extension": "*",
        "dotmailer/dotmailer-magento2-extension-enterprise": "*",
        "klarna/m2-payments": "*",
        "klarna/module-core": "*",
        "klarna/module-kp": "*",
        "klarna/module-ordermanagement": "*",
        "temando/module-shipping-m2": "*",
        "vertex/product-magento-module": "*",
        "vertex/module-tax": "*",
        "vertex/sdk": "*"
    },

Remove all optional core modules

"replace": {
    "magento/module-advanced-pricing-import-export": "*",
    "magento/module-amqp": "*",
    "magento/module-analytics": "*",
    "magento/module-authorizenet": "*",
    "magento/module-braintree": "*",
    "magento/module-bundle-import-export": "*",
    "magento/module-catalog-analytics": "*",
    "magento/module-customer-analytics": "*",
    "magento/module-customer-import-export": "*",
    "magento/module-cybersource": "*",
    "magento/module-dhl": "*",
    "magento/module-downloadable-import-export": "*",
    "magento/module-eway": "*",
    "magento/module-fedex": "*",
    "magento/module-google-adwords": "*",
    "magento/module-google-optimizer": "*",
    "magento/module-grouped-import-export": "*",
    "magento/module-marketplace": "*",
    "magento/module-message-queue": "*",
    "magento/module-multishipping": "*",
    "magento/module-mysql-mq": "*",
    "magento/module-new-relic-reporting": "*",
    "magento/module-persistent": "*",
    "magento/module-quote-analytics": "*",
    "magento/module-release-notification": "*",
    "magento/module-review-analytics": "*",
    "magento/module-sales-analytics": "*",
    "magento/module-sample-data": "*",
    "magento/module-send-friend": "*",
    "magento/module-signifyd": "*",
    "magento/module-swagger": "*",
    "magento/module-swagger-webapi": "*",
    "magento/module-swagger-webapi-async": "*",
    "magento/module-swatches": "*",
    "magento/module-swatches-layered-navigation": "*",
    "magento/module-tax-import-export": "*",
    "magento/module-ups": "*",
    "magento/module-usps": "*",
    "magento/module-version": "*",
    "magento/module-wishlist-analytics": "*",
    "magento/module-worldpay": "*"
},

OTHER TIPS

On my travels I've come across ths blog post

https://www.integer-net.com/make-magento-2-small-again/

But it makes sense what's been disabled

I haven't had the courage to do the full list but certainly I've removed the third party extensions from this list

Mage 2.3.1

"replace": {
        "magento/module-dhl": "*",
        "magento/module-fedex": "*",
        "magento/module-marketplace": "*",
        "magento/module-multishipping": "*",
        "magento/module-captcha": "*",
        "magento/module-persistent": "*",
        "magento/module-catalog-rule-configurable": "*",
        "magento/module-authorizenet": "*",
        "magento/module-google-adwords": "*",
        "magento/module-sample-data": "*",
        "magento/module-send-friend": "*",
        "magento/module-swagger": "*",
        "magento/module-swagger-webapi": "*",
        "magento/module-swagger-webapi-async": "*",
        "magento/module-swatches": "*",
        "magento/module-swatches-layered-navigation": "*",
        "magento/module-google-optimizer": "*",
        "magento/module-ups": "*",
        "magento/module-usps": "*",
        "magento/module-braintree": "*",
        "magento/module-signifyd": "*",
        "magento/module-release-notification": "*",
        "magento/module-new-relic-reporting": "*",
        "magento/module-version": "*",

        "magento/module-analytics": "*",
        "magento/module-catalog-analytics": "*",
        "magento/module-customer-analytics": "*",
        "magento/module-quote-analytics": "*",
        "magento/module-review-analytics": "*",
        "magento/module-sales-analytics": "*",
        "magento/module-wishlist-analytics": "*",

        "magento/module-bundle-graph-ql": "*",
        "magento/module-catalog-graph-ql": "*",
        "magento/module-catalog-inventory-graph-ql": "*",
        "magento/module-catalog-url-rewrite-graph-ql": "*",
        "magento/module-cms-graph-ql": "*",
        "magento/module-cms-url-rewrite-graph-ql": "*",
        "magento/module-inventory-graph-ql": "*",
        "magento/module-configurable-product-graph-ql": "*",
        "magento/module-customer-graph-ql": "*",
        "magento/module-downloadable-graph-ql": "*",
        "magento/module-eav-graph-ql": "*",
        "magento/module-graph-ql": "*",
        "magento/module-grouped-product-graph-ql": "*",
        "magento/module-quote-graph-ql": "*",
        "magento/module-store-graph-ql": "*",
        "magento/module-swatches-graph-ql": "*",
        "magento/module-tax-graph-ql": "*",
        "magento/module-url-rewrite-graph-ql": "*",
        "magento/module-weee-graph-ql": "*",

        "magento/module-advanced-pricing-import-export": "*",
        "magento/module-bundle-import-export": "*",
        "magento/module-configurable-import-export": "*",
        "magento/module-customer-import-export": "*",
        "magento/module-downloadable-import-export": "*",
        "magento/module-grouped-import-export": "*",
        "magento/module-tax-import-export": "*",

        "magento/module-inventory": "*",
        "magento/module-inventory-admin-ui": "*",
        "magento/module-inventory-api": "*",
        "magento/module-inventory-bundle-product": "*",
        "magento/module-inventory-bundle-product-admin-ui": "*",
        "magento/module-inventory-cache": "*",
        "magento/module-inventory-catalog": "*",
        "magento/module-inventory-catalog-admin-ui": "*",
        "magento/module-inventory-catalog-api": "*",
        "magento/module-inventory-catalog-search": "*",
        "magento/module-inventory-configurable-product": "*",
        "magento/module-inventory-configurable-product-admin-ui": "*",
        "magento/module-inventory-configurable-product-indexer": "*",
        "magento/module-inventory-configuration": "*",
        "magento/module-inventory-configuration-api": "*",

        "magento/module-inventory-elasticsearch": "*",
        "magento/module-inventory-grouped-product": "*",
        "magento/module-inventory-grouped-product-admin-ui": "*",
        "magento/module-inventory-grouped-product-indexer": "*",
        "magento/module-inventory-import-export": "*",
        "magento/module-inventory-indexer": "*",
        "magento/module-inventory-low-quantity-notification": "*",
        "magento/module-inventory-low-quantity-notification-admin-ui": "*",
        "magento/module-inventory-low-quantity-notification-api": "*",
        "magento/module-inventory-multi-dimensional-indexer-api": "*",
        "magento/module-inventory-product-alert": "*",
        "magento/module-inventory-reservations": "*",
        "magento/module-inventory-reservations-api": "*",
        "magento/module-inventory-sales": "*",
        "magento/module-inventory-sales-admin-ui": "*",
        "magento/module-inventory-sales-api": "*",
        "magento/module-inventory-sales-frontend-ui": "*",
        "magento/module-inventory-shipping": "*",
        "magento/module-inventory-shipping-admin-ui": "*",
        "magento/module-inventory-source-deduction-api": "*",
        "magento/module-inventory-source-selection": "*",
        "magento/module-inventory-source-selection-api": "*",
        "magento/module-inventory-distance-based-source-selection": "*",
        "temando/module-shipping-m2": "*",
        "dotmailer/dotmailer-magento2-extension": "*",
        "klarna/module-kp": "*",
        "klarna/module-ordermanagement": "*",
        "klarna/module-core": "*",
        "amzn/amazon-pay-sdk-php": "*",
        "amzn/amazon-pay-and-login-with-amazon-core-module": "*",
        "amzn/login-with-amazon-module": "*",
        "amzn/amazon-pay-module": "*",
        "vertex/module-tax": "*",
        "vertex/sdk": "*"
    },

They've also written blog post of 2.2.x

https://www.integer-net.com/removing-unused-core-modules-from-magento-2-the-right-way/

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top