Env :

  • Magento 2.3.7
  • PHP 7
  • VM on Linux

I'm facing an issue : my instance of Magento 2 is in developer mode. But I need, all the time, to redeploy static content (like JS and CSS ; with -f argument) on editing, so It's pretty counterproductive...

In my app/etc/di.xml file, I've Symlink for view_preprocessed. But the generated pub/static files are not linked to any file : it seems to be statics, like a copy. I don't understand because the advantage to be in developer mode is to avoid this pub static files generation after editing ... My files are not versioned.

I have MAGE_MODE to developer in my app/etc/env.php file. In my .htaccess file in pub directory, I have SetEnv MAGE_MODE developer . And the displayed mode in CLI are developer.

Do I have to edit my Apache configuration ? I apprechiate your help!

1 Answer 1


When you run command

$ bin/magento setup:static-content:deploy

All static content will be deployed (created copy) independent on mode

Remove pub/static and var/view_preprocessed and flush cache and after you've open front and the system will create symlinks in pub/static except some generated files

If you want to build on fly CSS you can configure grunt and run it in watch mode. See Compile LESS using Grunt

If you are modify something like requirejs-config.js you will need to flush cache

  • Thank you for your answer. I've deleted pub/static/adminhtml content and frontend (just content not folder). And after cache clean, I do not have any content in pub static folder.. except require js config file
    – Thomsath
    Jun 4, 2022 at 20:35
  • You can check a mode with bin/magento deploy:mode:show command. What is the OS and FS are you use? Magento should generates symlinks. What do you think when you load backend? Do you have properly configured HTTP server for serve static content? Jun 4, 2022 at 22:19
  • I'm in developer mode, deploy:mode:show command tell me also this. As mentionned i'm using Linux (Ubuntu). I don't know if my server is correctly configured, how can I see that ?
    – Thomsath
    Jun 5, 2022 at 7:16
  • When you load admin with empty pub/static do you have a correct styles and js? What HTTP server are you use? Jun 5, 2022 at 11:35
  • On admin pages I've the same result than in front : no JS and CSS loaded/generated. I'm using Apache 2
    – Thomsath
    Jun 5, 2022 at 11:56

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.