WordPress WP-CLI 2 cheatsheet
WordPress WP-CLI 2: Updates and maintenance
10 common WordPress WP-CLI 2 tasks.
Update WordPress
Update WordPress to the latest version.
wp core update
Caution: Back up the files and database first.
Check core files for tampering
Compare WordPress core files with the official checksums.
wp core verify-checksums
Check plugin files
Compare plugins from WordPress.org with their official checksums.
wp plugin verify-checksums --all
Turn on maintenance mode
Show the maintenance page to visitors while you work.
wp maintenance-mode activate
Run PHP in WordPress
Run a PHP snippet with WordPress loaded.
wp eval 'echo get_bloginfo("version");'
Open an interactive PHP shell
Start a shell with WordPress loaded for trying out functions.
wp shell
Generate a plugin skeleton
Create a plugin folder with the standard files.
wp scaffold plugin my-plugin