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

[BUG] WP CLI flush-css comand not working on multisite #7190

reardestani opened this issue Feb 25, 2019 · 3 comments


None yet
3 participants
Copy link

commented Feb 25, 2019


  • I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
  • The issue still exists against the latest stable version of Elementor.


When running wp elementor flush-css --network it does not regenerate the sites CSS. It only does so for the primary site as shown in this video:

The expected behavior is deleting all elementor > css > * directory contents in all sites not only primary site.

Steps to reproduce

  • Create a network with some sites
  • Do same as above video.

Isolating the problem

  • This bug happens with only Elementor plugin active (and Elementor Pro).
  • This bug happens with a default WordPress theme active.
  • I can reproduce this bug consistently using the steps above.

@bainternet bainternet added this to the 2.5.0 milestone Feb 25, 2019


This comment has been minimized.

Copy link

commented Feb 25, 2019

Tested the codes in the new commit, it fixes the issue. FYI


This comment has been minimized.

Copy link

commented Feb 27, 2019

@reardestani How do you regenerate the CSS files? You use the Tools > Regenerate CSS option?

If flush_css only removes the files, when are they recreated? bainternet confirmed me Elementor doesn't check for file existence and so doesn't trigger regeneration by itself.


This comment has been minimized.

Copy link

commented Feb 28, 2019

@tristanleboss Right, it doesn't trigger regeneration.

In our case, we need a UI option in network to regenerate Elementor CSS in all network sites.

At first, we developed a way to recursively delete all elementor folders in upload dirctory and we faced the issue that you mentioned.

Later we changed our way to use similar codes as below to fix the auto regeneration of assets.

public function flush_css( $args, $assoc_args ) {

Plugin::$instance->files_manager->clear_cache() function deletes the assets and their options in database so the assets will be regenerated on the first load.

@KingYes KingYes closed this in 2fb680e Mar 4, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.