wp-cli ๋กœ wordpress ํ…Œ๋งˆ ๊ด€๋ฆฌํ•˜๊ธฐ


help

help theme ๋ช…๋ น์„ ์‹คํ–‰ํ•˜๋ฉด theme ํ•˜์œ„ ๋ช…๋ น์–ด๋ฅผ ๋ณผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

$ wp-cli help theme

NAME

  wp theme

DESCRIPTION

  Manages themes, including installs, activations, and updates.

SYNOPSIS

  wp theme <command>

SUBCOMMANDS

  activate          Activates a theme.
  auto-updates      Manages theme auto-updates.
  delete            Deletes one or more themes.
  disable           Disables a theme on a WordPress multisite install.
  enable            Enables a theme on a WordPress multisite install.
  ...

์กฐํšŒ์™€ ๊ฒ€์ƒ‰

status

theme status ๋ช…๋ น์œผ๋กœ ํ˜„์žฌ ํ…Œ๋งˆ์˜ ๋ชฉ๋ก๊ณผ ํ™œ์„ฑํ™” ์—ฌ๋ถ€๋ฅผ ์•Œ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

$ wp-cli theme status

3 installed themes:
  I twentynineteen  2.1
  I twentytwenty    1.8
  A twentytwentyone 1.4

Legend: I = Inactive, A = Active

A ๋Š” ํ™œ์„ฑํ™”๋œ ํ…Œ๋งˆ์ด๋ฉฐ I ๋Š” ๋น„ํ™œ์„ฑํ™”๋œ ํ…Œ๋งˆ์ž…๋‹ˆ๋‹ค.

search ๋ช…๋ น์–ด๋กœ ํ…Œ๋งˆ๋ฅผ ๊ฒ€์ƒ‰ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๋‹ค์Œ์€ sydney ๋ž€ ๋‹จ์–ด๊ฐ€ ์žˆ๋Š” ๋ชจ๋“  ํ…Œ๋งˆ๋ฅผ ๊ฒ€์ƒ‰ํ•˜์—ฌ ์ถœ๋ ฅํ•ฉ๋‹ˆ๋‹ค.

themeforest ๋“ฑ์—์„œ ํŒ๋งคํ•˜๋Š” ์ƒ์šฉ ํ…Œ๋งˆ๋Š” ๊ฒ€์ƒ‰๋˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.

$ wp-cli theme search sydney

Success: Showing 2 of 2 themes.
+--------------+--------------+--------+
| name         | slug         | rating |
+--------------+--------------+--------+
| ์‹œ๋“œ๋‹ˆ       | sydney       | 98     |
| Hotel Sydney | hotel-sydney | 0      |
+--------------+--------------+--------+

๊ด€๋ฆฌ

์„ค์น˜

install ๋ช…๋ น ๋’ค์— ์„ค์น˜ํ•  ํ…Œ๋งˆ ์ด๋ฆ„์„ ์ž…๋ ฅํ•˜๋ฉด ๋ฉ๋‹ˆ๋‹ค.

$ wp-cli theme install astra

๊ฐฑ์‹ 

$ wp-cli theme update astra

ํ™œ์„ฑํ™”

activate ๋ช…๋ น์œผ๋กœ ํ™œ์„ฑํ™”. ๊ธฐ์กด์— ํ™œ์„ฑํ™”ํ•œ ํ…Œ๋งˆ๋Š” ์ž๋™์œผ๋กœ ๋น„ํ™œ์„ฑํ™”๋ฉ๋‹ˆ๋‹ค.

$ wp-cli theme activate astra


๊ฐ™์ด ๋ณด๊ธฐ