You are currently viewing WP CLI

WP CLI

  • Post author:
  • Post category:General
  • Post comments:0 Comments
  • Post last modified:September 8, 2023
  • Reading time:2 mins read

Install

Installation instruction:
https://wp-cli.org/#installing

				
					curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar

php wp-cli.phar --info

chmod +x wp-cli.phar
sudo mv wp-cli.phar /usr/local/bin/wp
				
			

To test the installation:

				
					wp --info
				
			

Commands

  • Each command starts with: wp
  • Next you need to use a sub-command such as core, theme, plugin, and…
  • Then use a sub-command for the sub-command like install
  • The last section of the command is option
				
					wp theme install twentytwentyone

Installing Twenty Twenty-One (1.8)
Downloading installation package from https://downloads.wordpress.org/theme/twentytwentyone.1.8.zip...
Unpacking the package...
Installing the theme...
Theme installed successfully.
Success: Installed 1 of 1 themes.
				
			
				
					wp help

wp help theme

wp help theme install
				
			

To exit the list of commands in help command, just press q key.

Leave a Reply