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 – 13:00 5:00 – 13:00 5:00 – 13:00 5:00 – 13:00 5:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: America/Argentina/Buenos_Aires (GMT-03:00)

This topic contains 9 replies, has 0 voices.

Last updated by Otto 1 month, 1 week ago.

Assisted by: Otto.

Author Posts
April 3, 2025 at 2:55 pm #16892703

andreaT-10

Background of the issue:
Estoy investigando problemas de rendimiento en un sitio WooCommerce que utiliza WPML y el tema Woodmart. Estoy analizando consultas SQL duplicadas y lentas usando Query Monitor. Tengo un plan de hosting Gogreek en SiteGround. Aquí están mis hallazgos: Con Memcache deshabilitado, obtengo una carga relativamente estable con aproximadamente 192 consultas duplicadas en páginas de categoría con múltiples productos variables. La mayoría de estas consultas son: SELECT t.term_id FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON t.term_id = tt.term_id WHERE tt.taxonomy IN ('pa_colore') AND t.slug IN ('example-color') LIMIT 1. Estas son activadas por WP_Term_Query->get_terms() en combinación con WPML_Term_Query_Filter->guess_term(). Con Memcache habilitado, el rendimiento del sitio cae drásticamente: hasta 909 consultas duplicadas en las mismas páginas de categoría. La gran mayoría son las mismas llamadas WP_Term_Query relacionadas con los atributos pa_colore y pa_misura. Deshabilitar Memcache reduce el número de consultas duplicadas a 192. Estoy usando las últimas versiones de WPML (completamente actualizado), WooCommerce y el tema Woodmart. Ya he optimizado otras fuentes de duplicación de consultas (por ejemplo, plugin Scalapay, tarjetas de regalo, etc.). Estoy buscando una manera de reducir estas consultas de términos relacionadas con WPML, especialmente aquellas activadas por guess_term(). Enlace a una página donde se puede ver el problema: hidden link

Symptoms:
Con Memcache habilitado, el rendimiento del sitio cae drásticamente con hasta 909 consultas duplicadas en las páginas de categoría.

Questions:
¿Hay alguna manera de almacenar en caché o precargar estas traducciones de términos para evitar llamadas excesivas a get_terms()?
¿Es WPML compatible con sistemas de caché de objetos como Memcache?
¿Tienen alguna solución o parche conocido para minimizar esta sobrecarga de WPML_Term_Query_Filter->guess_term()?

April 7, 2025 at 6:02 pm #16905613

Otto
WPML Supporter since 09/2015

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

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hola,

Disculpa el retraso en responder. Me encargaré de este ticket y el tiempo de respuesta será más corto ahora.

WPML es compatible con Memcache:
https://wpml.org/documentation/support/using-wpml-with-memcached-caching/

Normalmente no genera problemas de duplicación; sin embargo, algunas configuraciones de hosting o conflictos con plugins/temas pueden ocasionar que se disparen más consultas de las esperadas al traducir términos dinámicamente.

Como recomendación genérica, verifica la traducción de atributos que quizás no necesites traducir realmente (p.ej. algunos atributos de WooCommerce). Configurarlos como “No traducible” o “Traducible - usar el idioma por defecto si no existe traducción” puede reducir considerablemente el número de consultas.

Saludos cordiales,
Otto

April 8, 2025 at 1:29 pm #16909663

andreaT-10

Hola Otto,

I don't know why my message was write in Spanish, I hope you understand English as well.

Now I set all the attributes as "Translatable only shows translated items" and I reduced the number of duplicated queries to 64, but if I activate Memcache in product page I receive 1024 duplicated queries

hidden link

As hosting I use SiteGround with the GoGeek plan.

Do you have some suggestion to check, or same Memcache settings?

Thanks for your kind support
Andrea

April 8, 2025 at 3:05 pm #16910140

Otto
WPML Supporter since 09/2015

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

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hello Andrea,

Thanks. Yes, we can follow in English, sorry for the misunderstanding.

I want to discard compatibility issues because. Is it possible for you to do the following test?
**IMPORTANT:** Please try this in a staging environment or at least with a backup of your site files and database before continuing.

Disable all plugins except WooCommerce and WPML-related and temporarily change the theme to a default WordPress theme such as Twenty Twenty-five.
Is the issue resolved with these settings? If so, please reactivate one by one to see which conflicts.

Best Regards,
Otto

April 8, 2025 at 4:05 pm #16910372

andreaT-10

Hello,

I will try this these days with the staging and let you know. So do you confirm that WPML works well with Memcache?

Keep in touch
Andrea

April 8, 2025 at 4:14 pm #16910413

Otto
WPML Supporter since 09/2015

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

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hello,

Yes, it works. We have plenty of clients using it and plenty of them with SiteGround. And I didn't find any recent/open performance report. Unless there is a new bug, it should work.

Please let me know how the test goes when you do it.

Best Regards,
Otto

April 9, 2025 at 8:09 am #16911846

andreaT-10

Hello Otto,

I started my test on staging and I disabled all plug-ins with the exception of all WPML plugin, the Woodmart theme and WppBackery, and with Query monitor I checked the duplicated queries, that with Memcache disable was very low 48 at least but with Memcache goes until 1024.

Then I disabled Woodmart and activated Hello theme (thinking now I wrong, because Hello them is for Elementor but I use WpBakery) but it worked and the duplicated queries was only 8.

So it looks like a problem with WPML and Woodmart with Memcache.

I will do more test, do you have some ideas about that?

Thanks
Andrea

April 9, 2025 at 3:01 pm #16914785

Otto
WPML Supporter since 09/2015

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

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hello,

Thanks.

I would test deactivating WPML and see how the Woodmart theme alone performs with WooCommerce. Maybe it's just on them. The issue will be more noticeable with WPML as it adds some complexity, but maybe it's just the theme multiplying the queries.

Best Regards,
Otto

April 9, 2025 at 4:27 pm #16915045

andreaT-10

Hello Otto,

unfortunately is it not, I created a clean installation and step by step I testest the impact of each parts, starting with only WordPress and woocommerce, and standard team, and everything was fine.

Then I add Elementor Pro and change theme to Hello, and everything was fine, then I add WPML and I start to see more duplicated queries, then when I add Woodmart as theme the duplicated queries are exploded.

All my tests was with and without memcache.

So the problem is with WPML, Woodmart and Woocommerce with Memcache.

Now I sent an email to Woodmart team to ask them to investigate as well.

I will keep you update

Best
Andrea

April 9, 2025 at 5:18 pm #16915205

Otto
WPML Supporter since 09/2015

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

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Thanks Andrea.

Best Regards,
Otto

The topic ‘[Closed] WPML and Memcache on SiteGround’ is closed to new replies.