When the Magento2 site is in production mode and I want to modify some html/phtml/php/js files how can I update the edited files while remaining in production mode?
For the moment I have done this:
$ php bin/magento setup:upgrade $ php bin/magento setup:di:compile $ php bin/magento c:f
Finally I ran this command:
$ php bin/magento setup: static-content: deploy
When I ran the "setup: upgrade" command I saw that my files written by the production mode had already disappeared and the site did not work well.
Finally I ran the "setup: static-content: deploy" command and it returned me an error saying that it was not possible to compile the less files. Consequently I had to go back to default mode.
What could have been the mistake?