Solution
Which version of WP-CLI are you using? What is wp --version
returning you?
Seems a little bit that you may be running out of memory as this is quite a large amount of images and there doesn't seem some proper batch processing implemented in version 1 of WP-CLI. At least, that's how I'd understand this issue WP-CLI issue Clear WP object cache periodically on media regenerate/import which I found in the WP-CLI v2.0.0 Release Notes.
Is upgrading WP-CLI an option for you? If not you could also install it as a project-local dependency using Composer. Maybe you need to init a bare bone Composer project with composer init
in your WordPress folder first.
$ cd /path/to/wordpress
$ composer require wp-cli/wp-cli-bundle:^2
$ vendor/bin/wp media regenerate
OTHER TIPS
Had the same problem. wp media regenerate
would always get stuck at the same point with the Killed
message, even with the --only-missing
option.
In my case it was always after ID 571, so I tried wp media regenerate 570
, which was the next one, and it also failed with the same message. So I deleted this image from the media library and now it's working.
By the way, adding --debug
wouldn't give any hint about the problem. I also couldn't find any PHP logs about it.