What's the difference between weltpixel:css:generate and setup:static-content:deploy?

Comments

8 comments

  • Official comment
    Avatar
    Support
    The weltpixel:css:generate command is specific to the LESS/CSS generation process for the core theme modules:
     
    -Design Elements
    -Frontend Options
    -Product Page
    -Category Page
    -Custom Header
    -Custom Footer
     
    The LESS/CSS generation commands have no impact on the Magento Static Content, which the setup:static-content:deploy command handles. The LESS/CSS generation commands are optional for deployment scripts, for example, as the LESS/CSS generation can simply be run from the Magento Admin Cache Management section after the deployment is complete. It's simply advised you add them to your deployment process to save time. The LESS/CSS generation commands should be run after the Static Content Deployment:
     
    1. php bin/magento setup:static-content:deploy
    2. php bin/magento weltpixel:less:generate
    3. php bin/magento weltpixel:css:generate --store=all
     
    The LESS/CSS regeneration process (either via the Magento Admin or via the Command Line) also needs to be run in developer mode, if Magento Admin option changes are made to any of the modules in the list above for the changes to be reflected on the frontend. 
     
    More details about how the LESS/CSS generation functions can be found in this article: How the LESS/CSS file generation works in the Pearl Theme
    Comment actions Permalink
  • Avatar
    Joe Shelton

    Dan from WeltPixel answered:

    The weltpixel:css:generate command is specific to the LESS/CSS generation process for the core theme modules I mentioned in my previous reply.
     
    -Design Elements
    -Frontend Options
    -Product Page
    -Category Page
    -Custom Header
    -Custom Footer
    The LESS/CSS generation commands have no impact on the Magento Static Content, which the setup:static-content:deploy command handles. The LESS/CSS generation commands are optional for deployment scripts, for example, as the LESS/CSS generation can simply be run from the Magento Admin Cache Management section after the deployment is complete. It's simply advised you add them to your deployment process to save time. The LESS/CSS generation commands should be run after the Static Content Deployment:
     
    1. php bin/magento setup:static-content:deploy
    2. php bin/magento weltpixel:less:generate
    3. php bin/magento weltpixel:css:generate --store=all
     
    The LESS/CSS regeneration process (either via the Magento Admin or via the Command Line) also needs to be run in developer mode, if Magento Admin option changes are made to any of the modules in the list above for the changes to be reflected on the frontend. 
     
    I hope that further clarifies this for you! Let me know if there are any other questions.
     
    All the best, 
    Dan.
    0
    Comment actions Permalink
  • Avatar
    UNKNOWN

    Today I tried 'php bin/magento weltpixel:css:generate --store=all`

    But the CLI returned an error that  `-store=all`  is not a valid parameter...

    Currently needed to do:

    sudo -u www-data php bin/magento weltpixel:css:generate --store=default;

    sudo -u www-data php bin/magento weltpixel:css:generate --store=us;
    sudo -u www-data php bin/magento weltpixel:css:generate --store=au;
    sudo -u www-data php bin/magento weltpixel:css:generate --store=ca;
    sudo -u www-data php bin/magento weltpixel:css:generate --store=nz;
    sudo -u www-data php bin/magento weltpixel:css:generate --store=eu;

    sudo -u www-data php bin/magento weltpixel:css:generate --store=in;

    sudo -u www-data php bin/magento weltpixel:css:generate --store=cn;

    Wondering if there is a faster way to speed up :css:generate.

    0
    Comment actions Permalink
  • Avatar
    Support

    Try to regenerate from Admin > System > Tools > Cache Management:

    0
    Comment actions Permalink
  • Avatar
    UNKNOWN

    Thanks for the official comment Weltpixel. However it fails to address my question regarding its invocation via the CLI.

    Please can you directly address this question:
    ------------------------

    Today I tried 'php bin/magento weltpixel:css:generate --store=all`

    But the CLI returned an error that  `-store=all`  is not a valid parameter...

    (This was a parameter given by Weltpixel in a previous response above)

    0
    Comment actions Permalink
  • Avatar
    UNKNOWN

    I have a DevOps build pipeline and deployment scripts. 'Click-Ops' is not part of our workflow :)

    0
    Comment actions Permalink
  • Avatar
    Support

    Thanks for your update, Brad. We ran a quick test of our own and it doesn't seem there are any issues with the --store=all parameter. Here's a screenshot from the CLI, in which we ran both commands required for regenerating the LESS/CSS files:

    • (php) bin/magento weltpixel:less:generate
    • (php) bin/magento weltpixel:css:generate --store=all

    It's worth making sure you ran the command with the double hyphen (--), as your error seems to have a single hyphen. Moreover, ensure you're using the latest version of the theme. If you're on a very old version, it's actually possible the parameter didn't exist in the code.

    0
    Comment actions Permalink
  • Avatar
    UNKNOWN

    Well spotted re: (--) I wasnt sure.
    But just checked previous commits in git. It was indeed (--)

    sudo -u www-data php /var/www/magento/bin/magento weltpixel:css:generate --store=all

    ---------------------

    Magento version 2.3.3. Could this be why?

     

     

    0
    Comment actions Permalink

Please sign in to leave a comment.