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

's3-uploads' is not a registered wp command. #657

Open
etraininteractive opened this issue Nov 23, 2023 · 3 comments
Open

's3-uploads' is not a registered wp command. #657

etraininteractive opened this issue Nov 23, 2023 · 3 comments

Comments

@etraininteractive
Copy link

when I try to use 'wp s3-uploads verify' command to verify my configuration of the plugin, it throws an error saying, "'s3-uploads' is not a registered wp command."

I tried to resole by using this code in s3-uploads in php:
if ( ! class_exists( '\Aws\S3\S3Client' ) ) {
// Require AWS Autoloader file.
require_once dirname( DIR ) . '/vendor/autoload.php';
}

then, it throws CONSTANT error, even though I have added all the credentials like bucket name, bucket key and bucket secret in .env file.

Please help me to resolve this error.

@nickdnickd
Copy link

are you using bedrock? The vendor directory structure is different than this code expects. I was able to get around my constant server error with this quick and dirty change on a fork nickdnickd@26ef9f6

I am also seeing the CLI issue too though. For background I am running in a container. I can list the plugins, even re-activate the s3-uploads plugin, but I get the same error as your issue title.

@luizhsalazar
Copy link

@etraininteractive I was facing the same error few days ago . The way I figure it out was to activate the plugin ( wp plugin activate s3-uploads) before running any other command. Have you tried that?

@kirykr
Copy link

kirykr commented Apr 28, 2024

I got error:

Error: Callable "S3_Uploads\\WP_CLI_Command" does not exist, and cannot be registered as `wp s3-uploads`

find wp-cli.yml and add the code below

require:
  - wp-content/plugins/s3-uploads/inc/class-wp-cli-command.php

after I run wp plugin activate s3-uploads and wp s3-uploads verify
if configure the ENV correctly you should see the outputs below

Attempting to upload file s3://bucket-name/uploads/3682896686.txt
File uploaded to S3 successfully.
Attempting to delete file. s3://bucket-name/uploads/3682896686.txt
File deleted from S3 successfully.
Success: Looks like your configuration is correct.

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

4 participants