This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
Tagged: How to translate, Media Translation
Related documentation:
This topic contains 3 replies, has 2 voices.
Last updated by Andreas W. 11 months ago.
Assigned support staff: Andreas W..
Author | Posts |
---|---|
September 12, 2021 at 3:55 am #9570239 | |
Santiago |
Hello there, Please, can you help me to understand how to delete all the media translations. When "Post Types Translation - Media (attachment)" is "Translatable" I already try the "When deleting a post, delete translations as well" and don't do the job. Also try your: By the way, looks like many people needs the same in the pass. Thank you.- |
September 12, 2021 at 1:38 pm #9571361 | |
Andreas W. Supporter Languages: English (English ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Hello, First, please take a reliable backup of your site and database. Then, you could go to the media library and switch the language inside the top admin bar. Now, on the top-left chose the icon to select "View as list". Now, mark your media elements and delete them in bulk. In case you handle quite many duplicated images, we could try the following solution, but I would suggest to test this on Staging first: Best regards |
September 13, 2021 at 12:55 am #9572827 | |
Santiago |
Hello Andreas and thank you for your update. |
September 14, 2021 at 9:23 pm #9587275 | |
Andreas W. Supporter Languages: English (English ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Hello, Exaclty, this code is a kind of workaround. WPML will not remove any translated content when deactivating a language or even when deinstalling or even resetting the WPML plugin. The reset action does not delete translated images, translated posts, and translated taxonomies. It only affects the translation and language information that WPML associates with each content type inside the database. All pages, posts, taxonomies, and media will need to be removed manually. Now, we even could run some custom MySQL queries on your database and simply delete any media attachments inside the table wp_posts that are assigned to a different language than the ones you desire to use. The same we might need to do on the wp_postmeta and the icl_translations tables as well. Anyhow, as in the following ticket suggested by another user, the recommended way is using the WordPress backend for removing the media content, as each media element that you upload to WordPress is connected to various tables, and running an incomplete query could lead to unexpected DB entries that were missing or forgotten to get removed while running the queries. https://wpml.org/forums/topic/remove-multilingual-form-woocommerce-completely/#post-526208 Best regards |
The topic ‘[Closed] Delete all media translations’ is closed to new replies.