digitalmarketing and seo
Slide 1

We Designed for

Web Development
Image is not available

In the dynamic landscape of digital presence, harnessing the power of effective web development is paramount. At TAG VIBE....

Slide 2

We Designed

App Development
Image is not available

In today's mobile-centric world, having a mobile app is essential for reaching and engaging with your
audience....

Slide 3

We Designed

Digital Marketing & Search Engine Optimization
Image is not available

we great to do digital marketing and search engine optimization work as per google rule and regulation....

previous arrowprevious arrow
next arrownext arrow

How to remove unused core modules from Magento 2?

Spread the love

To reduce the load time sometimes we should to disable core modules for performance or security reasons. There, I sharing here the default way to disable a module:

bin/magento module:disable Vendor_Module

But in the above method below problem will be arise:

  • Module will be disable but files are still there.
  • If you run integration tests or static tests, it will run with including the disabled modules.
    So, we need a method to remove the module in a right way with the help of composer

Remove module with composer

As the core modules are loaded via composer as dependencies, we cannot simply remove them from the composer.json. we can remove those via replace capability.

composer file looks like below with replace key

“require”: {
[…]
},
“replace”: {
     “magento/module-marketplace”: “*”
},
“config”: {
[…]

Example to remove core modules like dotmailer, vertex, yotpo  below

“replace”:{
      “dotmailer/dotmailer-magento2-extension”: “*”,
      “dotmailer/dotmailer-magento2-extension-package”: “*”,
      “dotmailer/dotmailer-magento2-extension-enterprise”: “*”,
      “dotmailer/dotmailer-magento2-extension-chat”: “*”,
      “vertex/module-tax”: “*”,
      “vertex/sdk”: “*”,
      “vertex/module-address-validation”:”*”,
      “yotpo/magento2-module-yotpo-reviews” : “*”
},

Then, run the “composer update” command to remove the core modules which is mentioned inside replace section.

Scroll to Top