Why is it not recommended to modify the Magento 2 core files?

I'm guessing that when Magento 2 updates it replaces those modified files with the new files so it would be a best practice to create a extension/plugin instead?


  • Are you asking or telling? It is always recommended not to modify any framework's core files directly, otherwise you will not be able to update i future. Commented Aug 11, 2016 at 6:39
  • 1
    somewhere i heard, if anyone modified core files, they will go to hell :-) Commented Aug 11, 2016 at 6:40

1 Answer 1


Definitively, in any framework it is a bad idea to modify core files. There is almost always some way to override native code. There are many reasons, the two main being:

  • The risk to create side-effects on other modules
  • The risk to see your modification wiped out when you update the framework


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.