Skip to main content

wp theme update

Overview

Keep your themes current. Update all installed themes, specific ones, or only those belonging to a network. Essential for security and feature maintenance.

What It Does​

wp theme update checks for newer versions on wordpress.org (or custom update servers) and replaces the local theme files with the new version.

Syntax​

wp theme update <slug>... [OPTIONS]
| --all

Basic Usage​

Update one theme​

wp theme update twentytwentyfour

Update all themes​

wp theme update --all

Dry run (preview)​

wp theme update --all --dry-run

Real-World Scenarios​

Scenario 1: Nightly security updates via Cron​

# Update all themes quietly at 3 AM
wp theme update --all --quiet

Scenario 2: Rollback and update specific version​

# Reinstall a specific version if a child theme broke
wp theme update twentytwentyfour --version=1.1

Best Practices​

  1. Backup before updating — themes can contain breaking changes for child themes.
  2. Use --dry-run first on production.
  3. Flush cache after updating to clear potential template/CSS staleness.

Quick Reference​

wp theme update <slug> # Update one
wp theme update --all # Update all
wp theme update --all --dry-run # Preview update

Next Steps​