Please make sure to update to WPML 4.3.5 and check our list of Known Issues before reporting

Hi, Amit here, I am the WPML Support Manager, our current ticket queue is high, update your WPML plugins and make sure you meet the minimal requirements for running WPML before reporting an issue please - many tickets are resolved doing that

Please look at our updated list of Known Issues and you can also use our support search to find helpful information and of course review our documentation before opening a ticket.

If you do need to open a ticket please make sure to provide us with all the needed information as described in this page

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.

This topic contains 2 replies, has 2 voices.

Last updated by sergeyS-14 9 months, 2 weeks ago.

Assigned support staff: Yvette.

Author Posts
February 18, 2019 at 12:38 pm #3212229

sergeyS-14

Hi there! Because of a lot of images we have (90k aprox and will be more)

We wold like to disable Media Translation and delete all unnecessary data form database.

Can you please describe me an example to delete unnecessary data from database if i am will not use Media Translation?

In my plan i wold to this SQL: "DELETE FROM wp_icl_translations WHERE element_type = 'post_attachment';"

Is it enough only delete image related rows from _icl_translations table? Or there is more i need to delete?

Thank you.

February 19, 2019 at 7:33 am #3215270

Yvette
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+01:00)

Hello

Will these images be viewed/viewable from all language spaces when navigating your site?

If so, you will need the duplicated attachment entries the images for them to be seen. Otherwise, you may encounter blank spaces or grey image placeholders in secondary languages on the frontend

I would strongly recommend to first test the impact on the frontend with a few test cases before executing a massive delete.

However, to answer your technical question, to remove the affects of WPML Media, you will need to reverse the steps that you find here:
WPML > Settings > Media Translation

e.g.
5. Remove the checks from all options on this panel
4. Remove all references to the featured image custom field in secondary language posts (table: post-meta)
3. Remove all media attachment entries with parent posts in secondary languages (table: wp-posts)
2. Remove all secondary media attachment post types from Media Library (table: wp-posts)
1. Remove all language information for remaining media (table: icl_translations)

The best order to execute those steps in is something you will need to test yourself but I do think you will need to write severa queries using the icl_translations table as a directory. It might be easier to just eliminate all of your media and re-install the content from scratch with all Media options turned off - but this depends on your state of existing content in other langauges.

There is no way to turn off Media Translation in the core product apart from making sure you do not check any of the Step 5 options. But once again, I emphasize, you may not be able to visualize any images in secondary languages on your frontend.

I hope this answers your question.

February 19, 2019 at 9:04 am #3215601

sergeyS-14

My issue is resolved now. Thank you!