Skip Navigation

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 1 replies, has 2 voices.

Last updated by Nigel 2 years, 11 months ago.

Assisted by: Nigel.

Author Posts
June 28, 2022 at 1:38 pm

SoFA

My postmeta table is bloated. I have 360k rows with meta key "wpml_media_processed" despite only having 4500 images in my media library.

June 28, 2022 at 2:45 pm
June 29, 2022 at 11:57 am #11567433

Nigel
WPML Supporter since 02/2016

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

Hi there

Sorry it has taken a while for someone to follow up on this.

I looked at your database (I temporarily installed the WP Data Access plugin on your site to be able to run some queries to check the database content).

I can see that there are ~362143 entires in the postmeta table for the key wpml_media_processed.

Each of those entries in the postmeta table should ordinarily correspond to a post, but it is possible when deleting content that "orphaned" entries can be left in the postmeta table (i.e. posts the postmeta belong to have been deleted from wp_posts but the corresponding entries in wp_postmeta left in place). That's the kind of thing a database cleaner (it looks like you have 2 installed) would pick up and offer to fix.

But that's not the case here, because checking your posts table, there are 368831 attachment posts in the database. And most of these have a corresponding entry in wp_postmeta for the wpml_media_processed key.

So the problem isn't an unexpectedly large number of entries in postmeta for wpml_media_processed, it corresponds to the number of attachment posts you have.

Note that when you look at your media library and it shows you have ~4000 media posts, that is in one particular language only. If you are looking to reduce the number of entries for the wpml_media_process key in your postmeta table, then investigating the number of attachment posts you have would be the place to start.