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.

Sun Mon Tue Wed Thu Fri Sat
- - 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00
- - - - - - -

Supporter timezone: America/Lima (GMT-05:00)

This topic contains 6 replies, has 2 voices.

Last updated by Andreas W. 1 year, 6 months ago.

Assisted by: Andreas W..

Author Posts
June 22, 2023 at 10:36 am #13875479

xiaoweiX

Hi,

I was investigating the wp_postmeta table and I found this:

hidden link

My questions are :

1. What are those meta_keys for?
2. Are they safe to remove from wp_postmeta table?
3. How can I stop more of them from getting added into wp_postmeta table?

Thanks in advance
Shawn

June 22, 2023 at 10:44 am #13875533

xiaoweiX

Later I found more meta_keys related to wpml and wcml:

hidden link

June 23, 2023 at 1:48 am #13881467

Andreas W.
Supporter

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

Timezone: America/Lima (GMT-05:00)

Hello,

On every WordPress Database, the post meta table can become the biggest table of all, as it saves posts, pages, attachments, even custom post types, and any custom field used (unless the third plugin uses custom tables).

These meta fields from WPML relate, for example, to the featured image of a post, to a product gallery, or to other custom fields like those from ACF or Yoast that are needed in order to connect the content between languages.

For example, if you have a post with a featured image, then WPML will display the same image on the translated post, but it will need to create a connection between the original post_meta and the post_meta of the translated content, which is then is connected with the WPML database tables.

WPML Database Tables:
https://wpml.org/documentation/support/wpml-tables/

I would not suggest removing any of those entries and I hope I answered your question.

Best regards
Andreas

June 24, 2023 at 7:34 am #13888305

xiaoweiX

I understand in general that it's not recommended to manually remove rows in wp_postmeta. But could you help me understand the exact usage of the wpml/wcml related meta keys with the most values please? Thanks.

June 24, 2023 at 7:02 pm #13889409

Andreas W.
Supporter

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

Timezone: America/Lima (GMT-05:00)

Hello,

Do you have a specific field in mind, that you have a question about?

Truly, this request is out of the scope of our support to go into such details, but those fields are related to featured images, product galleries, and custom fields used on the products.

Each product detail in WooCommerce is a custom field, like price, stock, shipping, and other details.

Those fields are synced between products so that all products use the same price, stock, and other details, which can be quite many fields.

Example:
A translated product gets purchased and the stock needs to be reduced for the original products and other translations of this product simultaneously.

The more WooCommerce Addons you use, the more fields you will find.

I can not suggest touching any of those WCML custom fields.

Also, plugins like ACF, if used on product templates, or Yoast add more fields.

Take note, that WooCommerce has a new feature that will create a custom table for products and their metadata and this will enhance the performance of sites running WooCommerce.

https://woocommerce.com/document/high-performance-order-storage/

Our WCML plugin does support this feature in the current version 5.2.0.
https://wpml.org/download/woocommerce-multilingual-multicurrency/?section=changelog

Best regards
Andreas

June 28, 2023 at 10:39 am #13909283

xiaoweiX

I can't clear the _wpml_media_* keys even when I disable to wpml media translation addon?

June 28, 2023 at 7:02 pm #13913237

Andreas W.
Supporter

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

Timezone: America/Lima (GMT-05:00)

Hello,

I am not sure if those keys are really related to WPML Media.

I would suggest testing with a test product first. If after removing the keys the images are still displayed, then you should be able to remove them from the table.

Best regards
Andreas

The topic ‘[Closed] large amount of wpml related records in wp_postmeta table’ is closed to new replies.