If you're following our guide on Integrating Algolia with WordPress and you're getting the following error:
'algolia' is not a registered wp command. See 'wp help' for available commands
this means that the module is not seeing the Algolia functions. You need to make sure to add this code to your wp-cli.php file as shown in the guide:
<?php
if (!(defined('WP_CLI') && WP_CLI)) {
return;
}
class Algolia_Command {
}
WP_CLI::add_command('algolia', 'Algolia_Command');
If WP_CLI::add_command(‘algolia’, ‘Algolia_Command’); is missing then WP CLI does not see a function called Algolia.
Here is a code example you can utilize and incorporate https://github.com/algolia/wordpress-sample-plugin/blob/main/plugins/algolia-custom-integration/wp-cli.php
Please note that since the deprecation of our own extension we cannot provide support for any third party WordPress extensions for Algolia, you can find more details in our guide here: https://support.algolia.com/hc/en-us/articles/10960300066577.