Wp plugin install (WP-CLI)
Naar navigatie springen
Naar zoeken springen
wp plugin install
Install (including download) a WordPress plugin:
$ wp plugin install <plugin-naam|zip|url> # A plugin slug, the path to a local zip file, or URL to a remote zip file. [--version=<version>] # If set, get that particular version from wordpress.org, # instead of the stable version [--force] # If set, the command will overwrite any installed version of the plugin, # without prompting for confirmation. [--activate] # If set, the plugin will be activated immediately after install. [--activate-network] # If set, the plugin will be network activated immediately after install
Example:
wp plugin install duplicate-page --activate
With URL
Very handy: Rather than supplying the name, you can also apply a URL to a remote zip file. Some cases where this might be usefull:
- Strangely enough, sometimes I know the URL but not the name of a plugin
- For installing an own plugin
- For installing a plugin that I put online myself - This includes payed plugins as they are still open-source or free plugins that refuse to install, like Gravity Form's free add-ons.
Example:
wp plugin install https://downloads.wordpress.org/plugin/google-analytics-dashboard-for-wp.6.2.1.zip
...Worked perfectly.
However, I seem to be unable to do this with self-hosted files, eventhough the URLs work when entering in a browser address bar. E.g.:
wp plugin install https://media.example.nl/downloads/woocommerce-perfect-seo-url.zip
With local path
I couldn't get this to work in any other way:
wp plugin install /var/www/media.example.nl/downloads/gravityformsrecaptcha.zip --activate
Another example - Similar to the trial to install with a URL, but now succesful:
wp plugin install /var/www/media.example.nl/downloads/woocommerce-perfect-seo-url.zip