wp-cli / media-command

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

Found 1 image to regenerate. Warning: Can't find "DSC_XXXX" (ID XXXX). #175

Closed devxpoint closed 1 year ago

devxpoint commented 1 year ago

Bug Report

Hey there,

I have Wordpress 6.1.1 with PHP 7.4 and WP-CLI on shared hosting.

Physical root path to wordpress is: /data/web/1/000/037/971/129134/htdocs Physical root path to WP CLI is: /data/web/1/000/037/971/129134/htdocs/wp-cli.phar

php wp-cli.phar --info:

OS: FreeBSD 13.1-RELEASE-p3 FreeBSD 13.1-RELEASE-p3 GENERIC amd64 Shell: /usr/local/bin/bash PHP binary: /usr/local/bin/php PHP version: 7.4.30 php.ini used: MySQL binary: /usr/local/bin/mysql MySQL version: mysql Ver 14.14 Distrib 5.7.38, for FreeBSD13.1 (amd64) using EditLine wrapper SQL modes: WP-CLI root dir: phar://wp-cli.phar/vendor/wp-cli/wp-cli WP-CLI vendor dir: phar://wp-cli.phar/vendor WP_CLI phar path: /data/web/1/000/037/971/129134/htdocs WP-CLI packages dir: WP-CLI cache dir: /web/1/000/037/971/129134/.wp-cli/cache WP-CLI global config: WP-CLI project config: WP-CLI version: 2.7.1

Now I try to run php wp-cli.phar media regenerate 5233:

Found 1 image to regenerate. Warning: Can't find "DSC_0944" (ID 5233). Error: No images regenerated (1 failed).

In Wordpress the image with ID 5233 is shown up in media gallery, but NO postmeta data (datetime, dimensions...) But the image really exists under https://www.domain.com/wp-content/uploads/2023/01/DSC_0944.jpg

I want to recreate all metadata for the real existing images in uploads-folder. But the media regeneration seems not to work -.-

Any ideas?

danielbachhuber commented 1 year ago

Hey @devxpoint!

We don't typically use GitHub issues for support questions. Feel free to stop by the #cli channel on WordPress.org Slack if you'd like help debugging further.