Disable Adobe Commerce Banner output to improve site performance
This article provides a resolution for low site performance. Performance issues can occur when the Magento_Banner module is enabled but not in use. Disabling the module output can improve site performance; however, this action removes the Dynamic Blocks functionality from the Admin.
Description description
Environment
- Adobe Commerce on cloud infrastructure v.2.4.x
- Adobe Commerce on-premises v.2.4.x
Issue/Symptoms
The Magento_Banner module is enabled, but not used.
To check if this is the case:
For Adobe Commerce on cloud infrastructure 2.3.x and newer (the functionality was renamed in v 2.3.x):
- Log in to the Commerce Admin.
- Navigate to Content
>Elements>Dynamic Blocks. - If the grid displayed on this page is empty, you do not have any dynamic blocks (banners).
If you do not see the Dynamic Blocks option under Content > Elements, it means that you have already applied the recommendation from this article. To see the banners option again, reverse the process.
Root cause
When the Magento_Banner module is enabled, Adobe Commerce sends Ajax requests from the storefront to the server to get the banner information. These Ajax requests have a performance impact, especially in high-load (high-volume and high-traffic) conditions. If the functionality is not used, it is recommended that you disable the module output. It is not recommended to disable the module, because of the dependency issues.
Resolution resolution
Warning: We strongly recommend testing changes on Staging/Integration environment first, before applying it to Production. We also recommend having a recent backup before any manipulations.
- Disable the
Magento_Bannermodule output, as described in Disable module output in our developer documentation. The module name you need to use isMagento_Banner. - Deploy your code. For Adobe Commerce on cloud infrastructure, deploy as described in the Deploy your store article in our developer documentation.
- After disabling the module output, the menu no longer appears in the admin.
- You will no longer see the Banner or Dynamic option under Content
>Elements.
To restore the Dynamic Blocks functionality
-
Edit
app/etc/config.phpin your local codebase. -
Locate and remove the Magento_Banner disable‑output configuration.
If the Dynamic Blocks menu is missing in the Admin, ensure theMagento_Bannermodule output is not disabled inapp/etc/config.php.
If theMagento_Banneris the only module listed under advanced>modules_disable_output, you can remove this entire section below (all 5 lines):code language-none 'advanced' =>[ 'modules_disable_output' =>[ 'Magento_Banner' => '1' ] ] ,If other modules must remain disabled, remove only the
Magento_Bannerentry and ensure the final entry in the array does not end with a trailing comma, for example:code language-none 'advanced' =>[ 'modules_disable_output' =>[ 'First_Disabled_Module' => '1', 'Second_Disabled_Module' => '1' ] ] , -
Commit the change and redeploy your environment.
-
You will no longer see Banner or Dynamic option under Content
>Elements. To show the options again, enable the module output.