I'm facing an strange issue with my Magento 2.4 setup (Bitnami stack)

I'm currently working on a module. For testing purposes I put few echo strings and installed it.

And then as recommended I run all below commands to make sure all cache are cleared and files are generated.

bin/magento setup:upgrade bin/magento setup:di:compile bin/magento setup:static-content:deploy -f bin/magento cache:clean; bin/magento cache:flush

Now if I see the controller first time it echo the strings as it intended.

I then modify the controller with actual functionalities, and updated the server with the changed files, after that I followed the same set of commands to clear the cache and associated files.

Now when I open up controller on the browser, I see the same old echoed strings but doesn't show my new changes.

I thought it was a cache issue so I removed generated/code/Magento/ folder contents manually. But to no avail.

I also tried admin cache clear options but still the same.

I do not know apart from this cache folder there are any other caches settings.

In my setup I do have enabled Varnish cache.

Also, I noticed one time the changes I made previous day were not reflected on that day. But it was reflected on the next day.

I have no idea what's goin on.

For the time being I'm creating multiple copies of the same module with different names and install them just to carry on the developments. It kills my productivity and time.

I really would like to know your suggestions on this strange behavior and how to resolve this.


  • Try to flush varnish cache. Otherwise when I had a similar issue the problem was php opcache that can be cleared by restarting php. Commented Sep 7, 2021 at 19:12
  • Hello @CarloRicci, How do I flush varnish cache? what commands I should use please? Also do you mean restarting php is restarting Apache server? Commented Sep 8, 2021 at 7:14


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.