Wp plugin install (WP-CLI)

Uit De Vliegende Brigade
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


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.


wp plugin install https://downloads.wordpress.org/plugin/google-analytics-dashboard-for-wp.6.2.1.zip

...Worked perfectly.

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

See also