Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'elasticsearch' is not a registered wp command #185

Closed
alagirirajesh opened this issue Jan 1, 2015 · 6 comments
Closed

'elasticsearch' is not a registered wp command #185

alagirirajesh opened this issue Jan 1, 2015 · 6 comments

Comments

@alagirirajesh
Copy link

I am trying to install elasticsearch and have following the instructions as much as possible. But i am getting the above error when i am running the command "wp elasticpress index --setup --network-wide".

Also i am using wpmudev's directory plugin uses custom fields. Can you please let me know if the current version of elasticpress supports custom fields.

Please help. As i did not know where to ask for support writing here. if you can answer or direct me to a place where i can get support should be good.

@AaronHolbrook
Copy link
Contributor

Hi @alagirirajesh,
Based on the title of this issue, it sounds like you're actually running the command:

wp elasticsearch index --setup --network-wide

This will give you the exact message as the title of this issue - because elasticsearch is not the name of a command that the ElasticPress plugin implements. The command name is elasticpress. You should try:

wp elasticpress index --setup --network-wide

Hope that helps

@trueinviso
Copy link

I am running wp elasticpress index --setup and get the same error. Running wp help I can see that elasticpress is not an option in wp yet. In the bin/wp-cli.php file I can see that this is where the elasticpress command is supposed to be added to wp-cli, but for whatever reason this code hasn't run yet. Is there something I need to do to get this file to run?

@zamoose
Copy link
Contributor

zamoose commented Aug 6, 2015

Did you activate ElasticPress?

@trueinviso
Copy link

Yes, the problem seems to be that I have wordpress in a subdirectory and it can't find WP_CLI to add the elasticpress command to WP_CLI.

@nicoladj77
Copy link

I was having the same problem when running it on a hgv machine, but in that case you have to run

wp ep4wpe index --setup --network-wide

@trueinviso
Copy link

I was able to fix this by changing WP_CONTENT_DIR in wp-config file, ./content being the path to your wp-content location.

I was using:
define('WP_CONTENT_DIR', realpath($_SERVER['DOCUMENT_ROOT'] . '/content'));
And changed it to:
define('WP_CONTENT_DIR', realpath(dirname(__FILE__) . '/content'));

wp-cli could now find my project and the elasticpress command was added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants