Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE REQUEST] WP CLI Command to regenerate the CSS #2161

Closed
Nikschavan opened this issue Aug 9, 2017 · 8 comments
Closed

[FEATURE REQUEST] WP CLI Command to regenerate the CSS #2161

Nikschavan opened this issue Aug 9, 2017 · 8 comments
Assignees
Labels
request/feature Indicates a Request for a non-existing New Feature.
Milestone

Comments

@Nikschavan
Copy link
Contributor

This command can be chained in the automatic site migration tools to clear the cache after the site is migrated to live from staging or vice-versa.

Right now this can be quickly run from WP CLI like this - wp eval "Elementor\Plugin::$instance->posts_css_manager->clear_cache();" Although it would be nice to have this as a dedicated command.

@Nikschavan Nikschavan changed the title WP CLI Command to regenerate the CSS [FEATURE REQUEST] WP CLI Command to regenerate the CSS Aug 9, 2017
@KingYes KingYes added the request/feature Indicates a Request for a non-existing New Feature. label Aug 9, 2017
@KingYes KingYes self-assigned this Aug 9, 2017
@Nikschavan
Copy link
Contributor Author

Nikschavan commented Aug 11, 2017

I just added a PR #2177 which adds this command. I will appreciate feedback on a few points -

  1. I have placed the new file in includes\ directory. Is this Ok or needs to be changed?
  2. Right now I am loading the file with require_once only when the constant WP_CLI is defined. should this be loaded with the autoloader?

@julianxhokaxhiu
Copy link

Please consider this. I would like to have a control on flushing CSS files too.

@Nikschavan
Copy link
Contributor Author

I have made this as a WP Cli package which you can use in order to get this functionality - https://github.com/Nikschavan/elementor-commands/

@julianxhokaxhiu
Copy link

Wow, appreciated! Thanks :)

@HW-Siew
Copy link

HW-Siew commented Mar 3, 2018

Hi, @Nikschavan , I was trying to run wp eval "Elementor\Plugin::$instance->posts_css_manager->clear_cache();". but it show an error 'Parse error: syntax error, unexpected '->' (T_OBJECT_OPERATOR) in phar:///usr/local/bin/wp/vendor/wp-cli/eval-command/src/Eval_Command.php(37) : eval()'d code on line 1'.

Any idea what is wrong? Thanks for your advice.

@franzarmas
Copy link

@Nikschavan It is possible that the Elementor license can be activated through WP-CLI ?? just as you do with ASTRA ??? .. create a request for it to add it but surely they will delay in considering it .. it would take you a long time to develop it your friend? ...

I would thank you infinitely.

Thank you!

@KingYes
Copy link
Member

KingYes commented Jun 7, 2018

Thank @Nikschavan !

@KingYes KingYes closed this as completed Jun 7, 2018
@arielk arielk added this to the 2.1.0 milestone Jun 10, 2018
@ligne13
Copy link

ligne13 commented Nov 22, 2018

Hi,
correct me if I'm wrong but this command delete CSS files but do not recreate them for each page. Though the ticket subject was 'WP CLI Command to regenerate the CSS'.

Is there a way via CLI to generate the CSS file of each page ?

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
request/feature Indicates a Request for a non-existing New Feature.
Projects
None yet
Development

No branches or pull requests

7 participants