Install a theme
wp_install_themeInstalls a WordPress.org theme by slug without activating it, returning the installed slug and reported version. Use when you need the theme files present but want activation handled separately.
Instructions
Download and install a theme from the WordPress.org directory by its slug; the theme is not activated. Returns installed, stylesheet (the slug) and the version WordPress.org reported. Needs install_themes; refused when DISALLOW_FILE_MODS is set. No undo point is recorded. A theme whose folder exists already is not replaced; the answer is WordPress's error. Themes from a ZIP are installed with wp_install_theme_zip, and switching to a theme is wp_activate_theme.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | Yes | Theme slug from its wordpress.org address, e.g. "twentytwentyfive". Lower-cased; characters other than a-z, 0-9, "-" and "_" are dropped. |