Closed vadimkantorov closed 1 month ago
@vadimkantorov 100% correct:
./wp-cli.phar plugin install https://downloads.wordpress.org/plugin/simply-static.3.1.9.zip --activate is the way to go!
You won't even need to install the composer dependencies, as these are already included in the version hosted on w.org!
However, if you want to manage everything with composer instead, we also have our own package hosted on Packagist: https://packagist.org/packages/simplystatic/simply-static
And regarding a general composer workflow ^_^, what is the typical command sequence? update-install? I have a feeling that for wp2static above I'm a bit overdoing it...
(and maybe same question if I wanted to install simply-static using composer or from source)
Instead of doing:
curl -o composer.phar https://getcomposer.org/installer php composer.phar install php composer.phar update php composer.phar build php composer.phar install --quiet --no-dev --optimize-autoloader
You only need:
curl -o composer.phar https://getcomposer.org/installer php composer.phar install composer require simplystatic/simply-static
The require method of the CLI should handle the rest for you: https://getcomposer.org/doc/03-cli.md#require-r
Full example:
mkdir -p ./wp-content/plugins/simply-static cd ./wp-content/plugins/simply-static curl -o composer.phar https://getcomposer.org/installer php composer.phar install composer require simplystatic/simply-static cd ../../../ php ./wp-cli.phar plugin activate simply-static
How to install
simply-static
using CLI / wp-cli?For
wp2static
I did sth like the following, which seems excessive. What should be the corresponding command to installsimply-static
? e.g. could I somehow just dophp ./wp-cli.phar plugin install https://downloads.wordpress.org/plugin/simply-static.3.1.9.zip --activate
?And maybe there would be a simpler command to build the plugin locally? (e.g. a single composer install command?)
Thanks!