Skip to main content

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

FlagDescription
THEMESlug from wordpress.org, path to .zip, or URL
--activateInstall and activate in one step
--version=VERSIONInstall a specific version
--forceReinstall 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