Passer au contenu Passer à la barre latérale

Ce sujet contient 0 réponses, a 2 voix.

Dernière mise à jour par Maiya AI Support Il y a 3 mois et 1 semaine.

Assisté par: Maiya AI Support.

Auteur Messages
août 29, 2025 à 8:41 am #17357127

kisa

Background of the issue:
I am experiencing severe performance issues on my WooCommerce site due to WPML. After installing Query Monitor, I noticed around 700 SQL queries per page load, with approximately 279 queries coming directly from WPML, especially from wp_icl_translations. The slowest query takes about 0.45 seconds and repeats many times, causing my host to return database connection errors and 500 server errors. Here is an example of the query that runs hundreds of times: SELECT wpml_translations.translation_id, wpml_translations.element_id, wpml_translations.language_code, wpml_translations.source_language_code, wpml_translations.trid, wpml_translations.element_type FROM wp_icl_translations wpml_translations JOIN wp_term_taxonomy tax ON wpml_translations.element_id = tax.term_taxonomy_id AND wpml_translations.element_type = CONCAT('tax_', tax.taxonomy) JOIN wp_icl_translations tridt ON tridt.element_type = wpml_translations.element_type AND tridt.trid = wpml_translations.trid WHERE tridt.element_id IN(136). This query is generated by WPML_Element_Translation->maybe_populate_cache() and it’s run repeatedly. I have already tried clearing WPML cache from the troubleshooting tools, cleaning transients, and optimizing database tables, but the problem persists.

Symptoms:
The site experiences severe performance issues with around 700 SQL queries per page load, leading to database connection errors and 500 server errors. The slowest query takes about 0.45 seconds and repeats many times.

Questions:
How can I reduce the number of duplicate queries WPML executes?
How can I optimize queries on wp_icl_translations or add proper indexes if recommended?
How can I cache translation lookups more efficiently to prevent MySQL overload?

Le sujet '[Fermé] Performance issue with WooCommerce + WPML (excessive SQL queries)' est fermé aux nouvelles réponses.