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

WP CLI upgrade command doesn't work #744

Open
curtismchale opened this issue Apr 16, 2024 · 12 comments
Open

WP CLI upgrade command doesn't work #744

curtismchale opened this issue Apr 16, 2024 · 12 comments
Assignees

Comments

@curtismchale
Copy link

When I run wp stateless upgrade images --b to upgrade all the images with the 4.0.3 update the command doesn't run and gives the error output:

Error: Something went wrong. External command process failed.

I have around 100 sites to upgrade and WP CLI commands are generally crucial to doing this efficiently.

@balexey88
Copy link
Contributor

Hello @curtismchale ,

Our team will investigate the issue and respond as soon as possible.

Thank you for the feedback!

@commercial-hippie
Copy link

@curtismchale is this for the new "WP-Stateless: Data Optimization Required" message shown in the admin panel?

I might be wrong but I don't think the wp stateless upgrade images --b command runs that optimization.

There is another command which lists the migrations:

wp stateless migrate

Only problem with this one is I think migrations for different sites have different IDs so there isn't a way to bulk run it.

@balexey88
Copy link
Contributor

@curtismchale,

The proper command is: wp stateless upgrade meta --b, type parameter should be meta instead of images. Included this into help message.
But still there was an issue, it's fixed and will be included in the next release.
Aside from that, upgrade command is very old and you don't need to use it, unless you are upgrading WP-Stateless from version 1 or 2. If this is your case and you still need to run it asap - please let us know.

As @commercial-hippie mentioned, there is a new command migrate. If you are updating from version 3 you need to run:

wp stateless migrate 20240219175240

In multisite environment the --url= global switch is used to target the specific site, so it is possible to run bulk update. Please refer to official official WP CLI doc for more information.

@curtismchale
Copy link
Author

@balexey88 we're upgrading from 3.4.1 to 4.0.2 and we're not on multi-site we run a Kubernetes cluster and have a build/deploy script that runs at the end of the deploy process to do database migrations, or add options or...whatever as needed.

At this point the stateless upgrade is also holding up the upgrade to WP 6.5.2 and some other plugins so I'd love to be able to run it now, but I can also pull out the stateless upgrade and wait a day or two. Do you have any ETA for getting the fix out to the commands?

@commercial-hippie it's for the message Data-Optimization Required in the screenshot below.

CleanShot 2024-04-18 at 07 14 41

@balexey88
Copy link
Contributor

balexey88 commented Apr 18, 2024

@curtismchale , if you are updating from 3.4.1 then you don't need to run wp stateless upgrade any more. You can safely remove it from deploy process and replace it with

wp stateless migrate 20240219175240

which is working fine.

@curtismchale
Copy link
Author

@balexey88 thanks. Is there a way to flay for yes because at this point the migration asks me to confirm I want to run it. I don't see an option for that in the documentation or anything in the WP CLI docs.

I can run the yes command but I figured I'd confirm first.

@commercial-hippie
Copy link

@curtismchale try adding --yes to the command, I think that should work.

@curtismchale
Copy link
Author

@commercial-hippie I tried many versions of -y, --y, -yes, --yes and the all come back with some variation of too many or unknown arguments. I did just try your suggestion again and got an error message about an unknown --yes parameter.

@curtismchale
Copy link
Author

I have had success with yes | wp stateless migrate 20240219175240 --allow-root which starts the migration.

@balexey88
Copy link
Contributor

balexey88 commented Apr 19, 2024

Hello @curtismchale,

I'm glad you found a solution. We will implement changes to make it easier to run migrate in build/deploy pipeline.

Thanks for your feedback!

@balexey88
Copy link
Contributor

Hello @curtismchale ,

We improved Data Optimization in CI/CD pipelines in our new release 4.1.1.

Please use the following command:

wp stateless migrate auto

It will automatically run all the required Data Optimizations.

Thanks for your feedback!

@curtismchale
Copy link
Author

I just tried it again wp stateless migrate auto with the latest update and got a similar error.

Error: Something went wrong. External command process failed.

It seems we tried to run wp stateless migrate 20240423174109 --yes --progress=1 so I assume I can manually run that as I've done before.

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

3 participants