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

Installing and Activating via WP-CLI #464

Closed
raamdev opened this issue Apr 10, 2015 · 6 comments
Closed

Installing and Activating via WP-CLI #464

raamdev opened this issue Apr 10, 2015 · 6 comments

Comments

@raamdev
Copy link
Contributor

raamdev commented Apr 10, 2015

A user @ WordPress.org writes...

I am using wp-cli to deploy this plugin to over 200 sites at once, I have installed and activated it, but it seems that I have to enable it manually for ZenCache to start working.

I'm not sure what's required to make this happen, but it would be great to make ZenCache fully compatible with WP-CLI so that installs can be automated.

Marking this as needs research.


Related: #395 #394 #465 #289 #464 #352

@aghoshx
Copy link

aghoshx commented Apr 10, 2015

Subscribing!

@jaswrks
Copy link

jaswrks commented Apr 10, 2015

@raamdev Suggestion for how to get this working. Or, at least a place to start.

Above this line...
https://github.com/websharks/zencache/blob/150409/zencache/zencache.inc.php#L345

Add the following:

// Automatic activation when installed via CLI.
if(strcasecmp(PHP_SAPI, 'cli') === 0 // Activated from a CLI?
    if(!get_option(__METHOD__.'__options') // First-time activation?
        && (!is_multisite() || !get_site_option(__NAMESPACE__.'_options')))
     {
        $this->options['enable'] = '1';
        update_option(__NAMESPACE__.'_options', $this->options);
        if(is_multisite()) update_site_option(__NAMESPACE__.'_options', $this->options);
     }

@raamdev raamdev modified the milestones: Future Release (Lite), Next Release (Lite) Jan 29, 2016
@raamdev raamdev modified the milestones: Future Release (Lite), Future Release (Pro), Next Release, Future Release Feb 22, 2016
@raamdev raamdev changed the title Installing and Activating ZenCache via WP-CLI Installing and Activating via WP-CLI Mar 21, 2016
@openbayou
Copy link

Would really like this as I manage a lot of WP sites as well.

@raamdev
Copy link
Contributor Author

raamdev commented Apr 10, 2016

Next Release Changelog:

  • Compatibility: WP-CLI. When installing Comet Cache via WP-CLI, Comet Cache is now automatically enabled. There's no need to manually enable Comet Cache from within the plugin options after installing. Props @jaswsinc. See Issue #464.

@raamdev raamdev closed this as completed Apr 10, 2016
@aghoshx
Copy link

aghoshx commented Apr 10, 2016

Thank you!

@raamdev
Copy link
Contributor Author

raamdev commented Apr 16, 2016

Comet Cache v160416 has been released and includes changes from this GitHub Issue. See the v160416 announcement for further details.


This issue will now be locked to further updates. If you have something to add related to this GitHub Issue, please open a new GitHub Issue and reference this one (#464).

@wpsharks wpsharks locked and limited conversation to collaborators Apr 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants