wp-cli / media-command

Imports files as attachments, regenerates thumbnails, or lists registered image sizes.
MIT License
44 stars 41 forks source link

media regenerate problem with large image amount #120

Open IIM-Andreas opened 4 years ago

IIM-Andreas commented 4 years ago

Bug Report

Hi, I ran the command wp media regenerate --only-missing --yes over about 111.000 images. About ~80.000 successful and ~30.000 failed.

The problem is that for the failed images, all image formats are gone or sometimes one is left in the database. I have like 12 image formats on my wordpress.

If I run the command for one failed image again wp media regenerate <post_id> --only-missing --yes it's successful.

So why get already correct existing formats in the database deleted when wp media regenerate fail?

Running wp media regenerate <post_id> --only-missing --yes with 100 post_id on the other hand works, strange thing.

encodiaweb commented 3 years ago

Same problem here. Is there any best practice about running wp media regenerate on such a big amount of images, without having errors?