I am trying to override a default Magento html template, but no matter what I try, it won't work. Here are the two paths:

Default Magento path:


Override Paths attemted:




There are other files in the project that are overriding the default files in this same exact way and they all work. I've tried flushing the cache multiple times, deleting and deploying static content, running setup:upgrade, none of it works. Also, I know it's not redirecting because if I change anything in the default path, those changes show up.

Any help is appreciated.

3 Answers 3


Just try below one:


After overriding it please run below command:

rm -rf generated/* pub/static/* var/*

php bin/magento s:up

php bin/magento s:s:d -f

php bin/magento cache:flush


Try following trick.

File: [Vendor]/[Module]/view/frontend/requirejs-config.js

var config = {
    map: {
        '*': {

File: [Vendor]/[Module]/view/frontend/web/templates/form/element/helper/tooltip.html

<!-- Your code here -->

After this open your magento 2 root directory in CLI and execute following commands.

rm -rf var/view_preprocessed/*
rm -rf pub/static/frontend/*
php bin/magento setup:static-content:deploy -f
php bin/magento cache:flush

This will work.


If you want to override the Magento UI component then you need to follow the steps

Step 1: Create a requirejs-config.js in your module and add the following code:-

var config = {
    map: {
        "*": {

Step 2: Copy From




Let me know if you still have any issue. Thanks

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.