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 Bobby 1 year ago.

Assigned support staff: Bobby.

Author Posts
June 28, 2019 at 6:42 pm #4109915


Tell us what you are trying to do?

i'm trying to optimize the postmeta table, as it's reached 1GB in size.
some of the most common meta_key happen to be WPML's:


SELECT `meta_key`, COUNT(`meta_key`) AS `value_occurrence` FROM `sddb_postmeta` GROUP BY `meta_key` ORDER BY `value_occurrence` DESC LIMIT 10

meta_key value_occurrence
_wp_attached_file 595304
_wp_attachment_metadata 595302
_thumbnail_id 444988
wpml_media_processed 297646
amazonS3_info 297276
as3cf_filesize_total 93189
_wpml_media_usage 38076
section 12252
_wpml_media_has_media 8747
amazonS3_cache 7709


this is the count of jpgs:
(the vast majority are used as galleries in custom post type, with one of the gallery used as featured image, then the custom post is duplicated in translations, which are finally managed as separate so that title can be translated)

SELECT ID FROM `wp_posts` WHERE `post_type`='attachment' AND `post_mime_type`='image/jpeg'

595193 total


can any of wpml_media_processed, _wpml_media_usage, _wpml_media_has_media be safely removed now that we are using the new Media Translation?
"Media Translation now serves the same attachments for translations, instead of creating duplicates"

June 28, 2019 at 8:39 pm #4110197


Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)


i believe that these are needed in order for everything to work smoothly and could possibly cause issues but i have contacted our developers regarding this query and will update you once i have news.

July 1, 2019 at 5:59 pm #4121521


Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

I was updated by our developers that indeed removing these keys will lead to issues and that usually these keys do not take up that much space.

is there a possibility another plugin is filling up the meta tables , also please verify that the table has been optimized

The topic ‘[Closed] WPML Media Translations – postmeta table records redundant?’ is closed to new replies.