WP CLI custom commands not working
Make sure to add them in active code. Adding a spare php file with the WP-CLI command definition in /wordpress won't work, because that code won't be loaded by WP. Dropping the file into wp-content/plugins won't work as well. Make it part of an active plugin, or use your theme's functions.php.