wp theme install
Overview
Add new themes to your WordPress installation. Supports searching the official directory, installing from local ZIPs, or fetching from remote URLs (like GitHub).
What It Does
wp theme install downloads the theme package, extracts it to wp-content/themes/, and verifies the installation.
Syntax
wp theme install <theme|zip|url>... [OPTIONS]
Arguments & Options
| Flag | Description |
|---|---|
THEME | Slug from wordpress.org, path to .zip, or URL |
--activate | Install and activate in one step |
--version=VERSION | Install a specific version |
--force | Reinstall even if already present |
Basic Usage
Install from wordpress.org
wp theme install astra
Install and activate immediately
wp theme install twentytwentyfour --activate
Install from a local ZIP
wp theme install ./my-themes/pro-theme.zip
Install from a GitHub URL
wp theme install https://github.com/user/repo/archive/main.zip
Real-World Scenarios
Scenario 1: Quickly setting up a staging site
# Install core theme + popular framework
wp theme install twentytwentyfour astra oceanwp
Scenario 2: Automating theme setup in a script
#!/bin/bash
THEME="my-custom-theme"
THEME_URL="https://example.com/themes/${THEME}.zip"
if ! wp theme is-installed "$THEME"; then
wp theme install "$THEME_URL" --activate
fi
Quick Reference
wp theme install <slug> # Basic install
wp theme install <slug> --activate # Install & Activate
wp theme install <url> # Remote ZIP
wp theme install <path.zip> # Local ZIP
Next Steps
wp theme activate— activate a theme you just installed.wp theme delete— remove themes you no longer need.