I have created a custom module and it was live and the store is in production.
I want to one minor change in my controller.
- Will It affect my site?
- Will the changes reflect directly?
I know we need to put to developer mode in order to perform the actions. This is urgent little work. Do let me know the outcome
-
You should never enable developer mode on production and there is no reason why you should need to.Andrew Noble– Andrew Noble2025年06月09日 19:31:29 +00:00Commented Jun 9 at 19:31
-
@Haarish Infant Raj Please add more details about how you created your custom module, and share the content and the path to your controller, as well as what you're trying to achieve, so the community can help you.PЯINCƎ– PЯINCƎ ♦2025年06月29日 20:51:13 +00:00Commented Jun 29 at 20:51
1 Answer 1
It is advised you carry out custom development in safe local/staging environments. Ideally, these changes are also tracked using version control software (git). There are several tools to help with local development (such as Warden https://docs.warden.dev/environments/magento2.html)
Your local environment should run in developer mode to ensure you are not causing any errors and also to prevent you from generating static content manually during development.
If you are making changes directly to your production environment (and I would very strongly advise against this), you should consider the following:
- Magento caches (can be cleared via admin)
- Varnish/FPC
- Amending constructor arguments/di.xml etc will require
php bin/magento setup:di:compileto be ran - Creating data patches or schema changes will require
php bin/magento setup:upgradeto be ran
It's hard to say exactly what you need to consider when making changes directly to production environment, hence why the industry standard is to always work locally first.
-
Agree with Liam here. You should test it thoroughly within a containerized environment, let QA smoke test it, and potentially treat it as a hotfix deployement if it's urgentrex– rex2025年06月09日 19:03:44 +00:00Commented Jun 9 at 19:03
-
Hii liam, I acknowledge your points. The thing is, it is a save controller. So I guess cache won't be a problem. i think If I give example, you can clear the doubt. I am using two arrays. Both array contains key 'price'. I've Previously used array1, now I want to use the array2. What happens if I did this in production directly.Haarish Infant Raj– Haarish Infant Raj2025年06月10日 07:05:54 +00:00Commented Jun 10 at 7:05