Zum Inhalt springen Zur Seitenleiste springen

Schlagwörter: 

Dieses Thema enthält 0, hat 0 Stimmen.

Zuletzt aktualisiert von pavlosP-3 Vor 6 Monaten, 3 Wochen.

Assistiert von: Lauren.

Autor Beiträge
Oktober 2, 2025 um 15:42 #17452561

pavlosP-3

Background of the issue:
I am trying to batch delete all image files via WP-CLI that contain a specific filename because they were mistakenly uploaded in bulk. I want to ensure that the command follows best practices with WPML. Here is the command I plan to use: wp media delete $(wp media list --format=ids --name_like="image-filename-of-bulk-upload-") --force. We use WPML Multilingual CMS 4.6.15, WPML SEO 2.1.0.1, and WPML String Translation 3.2.18. We do not use WPML Media Translation plugin. I read this documentation: https://wpml.org/forums/topic/images-deleted-in-media-library-in-one-language-are-still-visible-in-other-ml/. We are open to enabling the option "When deleting a post, delete translations as well" if necessary before running the command.

Symptoms:
No specific issue or error message mentioned.

Questions:
Do you think this command will delete all proper WPML related entries as well, such as images in additional languages and related icl_translations entries?
Is it necessary to enable the option "When deleting a post, delete translations as well" before running the command to ensure all images are deleted in all languages?