Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

media regenerate problem with large image amount

Open
#120 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
wordpress
Domain
cli

Research direction

Start by reproducing wp media regenerate --only-missing --yes with a large image batch, then compare it with the single-post command and the reported behavior of existing formats. Trace the media regeneration entry point and failure handling; done means failed images retain their existing formats, with coverage for batch and single-image runs.

Written by the indexing model from the issue text.

Description

command:media-regenerate

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.

Dominant language
Gherkin
Stars
47
Forks
42
Avg merge
2h 30m
Merged PRs (30d)
4

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from wp-cli/media-command

All issues in wp-cli/media-command

Similar issues

More CLI issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.