WP-CLI Flashcards
Q: What does WP-CLI stand for?
A: WordPress Command Line Interface.
Q: What is WP-CLI used for?
A: Managing WordPress sites via the command line.
Q: How do you check the installed version of WP-CLI?
A: wp –version.
Q: What is the default file that WP-CLI uses for configuration?
A: wp-cli.yml.
Q: Where is the WP-CLI configuration file located by default?
A: In the root directory of your WordPress installation or the home directory.
Q: What is the official command to install WP-CLI?
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
Q: How do you make WP-CLI globally executable?
chmod +x wp-cli.phar && sudo mv wp-cli.phar /usr/local/bin/wp
Q: How can you verify WP-CLI installation?
A: Run wp –info.
Q: What PHP version is required for WP-CLI?
A: PHP 7.4 or higher (may vary with newer versions).
Q: How do you update WP-CLI?
A: wp cli update.
Q: What command lists all available WP-CLI commands?
A: wp help.
Q: How do you display help for a specific command?
A: wp help <command></command>.
Q: How do you view the current status of your WordPress site?
A: wp core status.
Q: What flag runs a command in quiet mode, suppressing output?
A: –quiet.
Q: How do you execute a WP-CLI command in a specific WordPress installation directory?
A: wp –path=/path/to/wordpress <command></command>.
Q: How do you download the latest version of WordPress?
A: wp core download.