I have copied and pasted the file from




Modified some codes in that file, then after I have

  • cleared the cache
  • removed file manually from var/view_preprocessed and pub/static

But my code won't is displayed in the frontend.

Searched already via find command for another success.phtml file but nothing found.

Any ideas to override the success.phtml page?

  • Do you use opcache in your environment ? If use opcache, you need restart opcache or disable.
    – St3phan
    Commented Sep 28, 2017 at 13:23
  • If you solved this issue then please share solution. Commented Sep 7, 2018 at 6:18

3 Answers 3


In Magento 2.4.1 there are two success.phtml templates:


In my case, I had to override the second one in app/design/frontend/Vendor/Theme/Magento_InventoryInStorePickupFrontend/templates/success.phtml

  • 1
    I've seen some pretty stupid things in Magento in my time, but this one is pretty stupid. Appreciate you figuring that out, thought I was going nuts.
    – elfling
    Commented Aug 16, 2021 at 18:32
  • Insanely stupid... thank you!
    – Lez
    Commented Feb 10 at 13:38

To the following:

rm -r var/cache/* var/generation/* var/log/* var/view_preprocessed/* pub/static/_requirejs/* pub/static/adminhtml/* pub/static/frontend/* '


php bin/magento setup:di:compile

after this: php bin/magento setup:upgrade and php bin/magento setup:static-content:deploy

  • That's a bit overkill I guess when he's just adding a custom template. In fact php bin/magento setup:static-content:deploy should do.
    – Niels
    Commented Sep 28, 2017 at 14:56

Try to run these commands to set the developer mode and to regenerate all the static files.

alias mage="php -d memory_limit=-1 -f bin/magento";

mage maintenance:enable &&
mage deploy:mode:set developer &&
mage setup:upgrade &&
mage cache:flush &&
mage setup:static-content:deploy -f && 
mage setup:di:compile && 
mage maintenance:disable

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.