I get lots of adjustment requests (feature add, issue fix, etc) every day from one of my client.

Their site is in production mode and they want the changes to take effect immediately. I believe proper way of make changes is by scheduling it.

I want to know, if adjusting the code after compiling is bad practice?

Do I always need to re-compile after any change (small or big) to the extensions?

If it is bad practice then, would it matter if the extension is for admin area only?

Please suggest.

UPDATE On the change request, I make sure that no di.xml changes, no dependencies are added, no construct changes, no plugin added.


It is a bad practice and you shouldn't edit or adjust code without compilation - this can result in errors, mainly if you introduced some new dependencies in constructor, updated di.xml, created new plugins, etc.

For reference, this is magento deployment best practices https://devdocs.magento.com/guides/v2.3/performance-best-practices/deployment-flow.html

If you want to optimise your deployment time you should look into Continuous Integration - eventually, if set up correctly you can achieve zero downtime deployment effect

  • Sorry, I forgot to mention, no di.xml changes, no dependencies added, no construct changes, no plugin added. – Adarsh Khatri Feb 24 '20 at 4:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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