Skip to main content

wp plugin install

Overview

Install plugins from WordPress.org, a zip archive, or a direct URL without touching the dashboard. Combine with --activate to install and enable in a single command.

What It Does

wp plugin install downloads and installs a plugin from WordPress.org (by slug), a local zip file, or a remote zip URL. It creates the plugin directory under wp-content/plugins/ and extracts the files. Optionally, it activates the plugin immediately.

Syntax

wp plugin install <plugin|zip|url>... [--version=<version>] [--force] [--activate] [--activate-network] [--insecure]

Arguments & Options

Argument / FlagDescription
PLUGINWordPress.org plugin slug
ZIPPath to a local .zip file
URLURL of a .zip plugin package
--version=VERSIONInstall a specific version
--forceOverwrite existing installation
--activateActivate after install
--activate-networkNetwork-activate on multisite after install
--insecureSkip SSL verification

Basic Usage

Install from WordPress.org

wp plugin install woocommerce

Install and activate immediately

wp plugin install woocommerce --activate

Install a specific version

wp plugin install woocommerce --version=8.9.0

Install from a local zip file

wp plugin install /path/to/my-custom-plugin.zip --activate

Install from a URL (premium plugin)

wp plugin install https://example.com/downloads/my-plugin.zip --activate

Force reinstall (overwrite existing)

wp plugin install woocommerce --force

Install multiple plugins at once

wp plugin install woocommerce contact-form-7 yoast-seo litespeed-cache --activate

Expected Output

Installing WooCommerce (9.0.1)
Downloading install package from https://downloads.wordpress.org/plugin/woocommerce.9.0.1.zip...
Unpacking the package...
Installing the plugin...
Plugin installed successfully.
Activating 'woocommerce'...
Plugin 'woocommerce' activated.
Success: Installed 1 of 1 plugins.

Real-World Scenarios

Scenario 1: Fresh WordPress setup with standard plugin stack

#!/bin/bash
PLUGINS=(
"woocommerce"
"contact-form-7"
"yoast-seo"
"litespeed-cache"
"acf"
"wordfence"
)

for plugin in "${PLUGINS[@]}"; do
wp plugin install "${plugin}" --activate
done

echo "All plugins installed and activated ✅"

Scenario 2: Install a specific version for compatibility testing

# Install an older WooCommerce for testing
wp plugin install woocommerce --version=8.5.0 --force --activate

Scenario 3: Install a premium plugin from URL (with auth token)

# Many premium plugins distribute via secure download URLs
wp plugin install "https://api.mypremiumshop.com/downloads/plugin.zip?token=XXX" --activate

Scenario 4: Install from a zip in a deployment pipeline

# Company private plugin delivered as zip artifact
wp plugin install ./build/my-company-plugin.zip --activate --force

Scenario 5: Network-install and activate on multisite

wp plugin install woocommerce --activate-network

Best Practices

  1. Use --activate by default — install + activate in one step is cleaner.
  2. Specify --version when pinning — ensures reproducible environments.
  3. Use --force only when reinstalling after crashes or security incidents.
  4. Install multiple plugins in a single command — more efficient than running separately.
  5. Verify after install with wp plugin status SLUG.

Troubleshooting

ProblemCauseFix
Error: Plugin not foundWrong slug or not on WordPress.orgVerify slug on wordpress.org/plugins
SSL verification failedServer CA issueUse --insecure (on trusted networks only)
Plugin installs but fails to activatePHP/dependency errorCheck PHP error log; resolve dependency
Destination folder already existsPlugin already installedAdd --force to overwrite
Zip not installingMalformed zip or wrong structureUnzip and inspect; ensure main plugin PHP file is valid

Quick Reference

wp plugin install woocommerce                          # Install from WP.org
wp plugin install woocommerce --activate # Install + activate
wp plugin install woocommerce --version=8.9.0 # Specific version
wp plugin install my-plugin.zip --activate # From local zip
wp plugin install https://example.com/p.zip --activate # From URL
wp plugin install plugin-a plugin-b plugin-c --activate # Multiple
wp plugin install woocommerce --force # Reinstall

Next Steps