Themes

Operations with themes use the wp theme command.

Theme Status

First, you can check the status, and get the accepted names, of some or all themes with:

wp theme status

Update Theme

You can update one or more themes with:

wp theme update <theme>

If you want to update all themes, use:

wp theme update --all

Delete a Theme

You can also delete a theme. It looks like it won’t delete the active theme without an extra option to force the deletion, but it might still delete a parent theme you’re using, so be careful!

If you want to delete a theme:

wp theme delete <theme>

Roll Back a Parent Theme

If you need to roll back a parent theme, you use the wp theme command with the same syntax you would for rolling back a plugin. For example, to test rolling back the theme “sometheme” to version 1.2.0:

wp theme update --version=1.2.0 --dry-run

Once you’re sure the roll-back will work, execute the command without the –dry-run option:

wp theme update --version=1.2.0