wp-rocket-cli icon indicating copy to clipboard operation
wp-rocket-cli copied to clipboard

Installation method

Open jmslbam opened this issue 3 years ago • 4 comments

Please re-consider loading it as a regular plugin or merge it with the WP Rocket plugin itself.

Not every server is fitted to use the WP-CLI package installer.

E.g. No composer on the server, or composer misconfigured, or server is managed by hosting that doesn't allow installing it.

In my case (and other WP-CLI users) installing a WP-CLI package results in Composer memory errors.

[xyz@foo public_html]$ wp package install wp-media/wp-rocket-cli
Installing package wp-media/wp-rocket-cli (dev-master)
Updating /home/xyz/.wp-cli/packages/composer.json to require the package...
Using Composer to install the package...
---
Loading composer repositories with package information
Updating dependencies
Resolving dependencies through SAT
Looking at all rules.

Dependency resolution completed in 0.018 seconds
Analyzed 1839 packages to resolve dependencies
Analyzed 74806 rules to resolve dependencies
Package operations: 1 install, 0 updates, 0 removals
Installs: wp-media/wp-rocket-cli:dev-trunk 4499a10
 - Installing wp-media/wp-rocket-cli (dev-trunk 4499a10)
PHP Warning:  proc_open(): fork failed - Cannot allocate memory in phar:///usr/local/bin/wp/vendor/symfony/process/Process.php on line 285
PHP Warning:  proc_open(): fork failed - Cannot allocate memory in phar:///usr/local/bin/wp/vendor/symfony/process/Process.php on line 285
PHP Warning:  proc_open(): fork failed - Cannot allocate memory in phar:///usr/local/bin/wp/vendor/symfony/process/Process.php on line 285
PHP Warning:  proc_open(): fork failed - Cannot allocate memory in phar:///usr/local/bin/wp/vendor/symfony/process/Process.php on line 285
Warning: Unable to launch a new process.
---
Error: Package installation failed.
Reverted composer.json.

So now I need to install it by:

  1. Adding the plugin header back in manually https://github.com/wp-media/wp-rocket-cli/commit/4fef271d1d3abf661bc14b82836f30ac91e948a9 and re-upload it.
  2. Or include the code in my project myself.

Did it broke the loading of the plugin to leave the plugin header in? When it was installed via the WP-CLI package manager?

Kinds regards,

Jaime

jmslbam avatar Aug 05 '21 13:08 jmslbam

I was able to install with wp package install wp-media/wp-rocket-cli:@stable

reggieofarrell avatar Aug 25 '21 02:08 reggieofarrell

Yeah, some probally will be able to install it. I could install it on my local developement setup.

But not on my webserver because of the architecture of user permission settings / memory assignment etc.

It's more that this method of installing doesn't have a 100% succes-rate which makes manually changing the code a overhead, which minimize the amount of people that will be using it. It's a treshold thrown-up which doensn't have to be there.

Making me go through these extra loops doesn't make it more friendly.

jmslbam avatar Aug 25 '21 09:08 jmslbam

The host comes w/ WP-CLI pre-installed but doesn't allow WP-CLI packages to be installed via WP-CLI?

ethanclevenger91 avatar Sep 17 '21 18:09 ethanclevenger91

It's doesn't prevent the installation of packages via WP-CLI. It just doesn't work because composer (used by WP-CLI to install these packages) triggers a error (common error) whíle installing a WP-CLI package and we can't solve that. On Sep 17, 2021 20:16, Ethan Clevenger @.***> wrote: The host comes pre-installed w/ WP-CLI but doesn't allow WP-CLI packages to be installed via WP-CLI?

—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or unsubscribe.Triage notifications on the go with GitHub Mobile for iOS or Android.

jmslbam avatar Sep 19 '21 14:09 jmslbam